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

来源:互联网 发布:快速移动文件软件 编辑:程序博客网 时间:2024/06/15 22:31

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即可终结。

重启数据库,运行成功。


0 0
原创粉丝点击