Home  >  Article  >  Backend Development  >  php连接mysql出错:Fatal error: Call to undefined function mysql_connect(),该如何处理

php连接mysql出错:Fatal error: Call to undefined function mysql_connect(),该如何处理

WBOY
WBOYOriginal
2016-06-13 09:58:351220browse

php连接mysql出错:Fatal error: Call to undefined function mysql_connect()
php连接mysql出错:Fatal error: Call to undefined function mysql_connect() .

phpinfo 配置如下:

  http://blog.csdn.net/attop/article/details/6906539


请教如何解决,谢谢!

------解决方案--------------------
http://taichi.blogbus.com/logs/6786608.html,刚接触的话感觉还是用wamp之类的集成包比价好,不要在配置上花太多时间
------解决方案--------------------
那个 mysqlnd 是否为 mysql 的升级产品?
------解决方案--------------------

探讨

引用:
mysql安装了么?
没有打开mysql的扩展,只开了mysqli的和pdo



mysql装了,也启动了

不是只要 --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd就行了吗?

手册上说mysqli扩展可以代替mysql的扩展,并推荐用mysqli的扩展

------解决方案--------------------
肯定是mysql扩展没开启,开启吧重启apache
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