Home  >  Article  >  Backend Development  >  mysql客户端会连,php不能连接,求赐教

mysql客户端会连,php不能连接,求赐教

WBOY
WBOYOriginal
2016-06-13 12:22:17914browse

mysql客户端能连,php不能连接,求赐教
应该是用卡吧死机关闭了mysql的远程连接之后
数据库客户端可以连接

php不能连接




------解决思路----------------------
你需要安装php_mysql 或使用mysqli来操作。
因为你装的是mysqli,建议使用mysqli来操作。
参考:http://www.cnblogs.com/siqi/p/3776577.html
------解决思路----------------------
还没有解决?
从 #1 命令窗口截图上看:
1、你的 MySQL 版本是 5.5 的
2、你的 MySQL 位于系统搜索路径中
你可尝试在系统环境变量 PATH 中去掉 MySQL 的路径,或将 php 的路径插入到 MySQL 路径之前
如果是 MySQL5.6 这个是必须做的,因为 php 不能利用 MySQL5.6 的客户端,需要用自己携带的客户端
你现在极有可能也是这个问题

这也是 php5.5 不建议使用 mysql 扩展的原因之一

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn