您的位置:首页 > 产品设计 > UI/UE

Fatal Error: ezSQL_mysql requires mySQL Lib to be compiled and or linked in to the PHP engine

2017-03-13 18:18 1581 查看
Fatal Error: ezSQL_mysql requires mySQL Lib to be compiled and or linked in to the PHP engine

解决方法:PHP
5.5.0 起不再支持mysql_conn。你需要下载PHP 5.5以下的版本才可运行。

看了下源码,在ez_sql_mysql.php中有这样一行:

if ( ! function_exists ('mysql_connect') ) die('<b>Fatal Error:</b> ezSQL_mysql requires mySQL Lib to be compiled and or linked in to the PHP engine');
于是,mysql_connect是什么鬼???

问度娘:“PHP 怎么配置 mysql_connect”

度娘答:“php高版本不再使用mysql_connect()来连接数据库

原来如此,于是去UPUPW下了PHP5.4版本。运行成功。

如果在5.4版本,数据库启动失败。可能是端口被占用了。

不用管它,因为占用端口的可能是数据库本身。

如果被其它的占用——

打开cmd,输入 netstat -ano | findstr "3306"

如果有数据,则看到数据的每行的最后一列数字,那个是占用端口的进程。

比如:

 TCP    0.0.0.0:3306           0.0.0.0:0              LISTENING      1024

 TCP    [::]:3306              [::]:0                 LISTENING      
1024

输入:taskkill  /f /pid 1024即可终结。

重启数据库,运行成功。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐