以下版本的mysql支持php的mysqli扩展模块
MySQL-client-5.1.32-0.glibc23.i386.rpm
MySQL-devel-5.1.32-0.glibc23.i386.rpm
MySQL-server-5.1.32-0.glibc23.i386.rpm
MySQL-shared-5.1.32-0.glibc23.i386.rpm
以下版本的mysql不支持php的mysqli扩展模块,国外论坛有报告该项bug.
MySQL-server-5.0.22-0.i386.rpm
MySQL-client-5.0.22-0.i386.rpm
MySQL-shared-5.0.22-0.i386.rpm
MySQL-devel-5.0.22-0.i386.rpm
在编译php对mysqli的支持的时候出现了如下错误:
./configure --with-apxs2=/usr/sbin/apxs2
--with-mysqli=/usr/bin/mysql_config
The configuration process breaks with the following lines:
checking for MySQLi support... yes
checking whether to enable embedded MySQLi support... no
checking for mysql_set_server_option in -lmysqlclient... no
configure: error: wrong mysql library version or lib not
found. Check config.log for more information.
----------------------------------------------------------
安装PHP对mysqli扩展模块支持出现“wrong mysql library version
or lib not found. 错误,大多是由于以前有旧的版本mysql的链接库
或符号连接,没有完全清除引起,或者使用了不稳定版的mysql安装包。
使用如下命令查看mysql库(lib):
mysql_config --libs
如果显示:
-L/usr/lib/mysql -lmysqlclient -lcrypt -lnsl -lm -lz
这可能是一个旧的32位版的mysql库
如果显示
-L/usr/lib64/mysql -lmysqlclient -lcrypt -lnsl -lm -lz
这是64位版的,最新的...
也许二个同时存在,
you can made a symlink from /usr/lib64/mysql to /usr/lib/mysql and now the
configuration and compiling works.
------------------------------------------------------------
如果mysql正常安装完毕,但不能启动,用以下命令检查mysql状态:
[root@localhost user]# service mysql status
若显示:
MySQL is not running, but lock exists [失败]
提示mysql没有运行,但是lock文件在。
lock文件是服务运行时自保护的一把锁。有该文件,就保证只能启动一个服务进程。那么正常情况下,服务不运行是没有这个lock文件的。现
在就是出了这个,所以系统不能启动。
/var/lock/subsys/mysql 该文件即为mysql的lock文件,删除,再启动,看是否正常!
如果还不正常,请进入mysql数据库数据文件(不是运行文件)目录下:
一般默认安装其路径为/var/lib/mysql/,每个数据库文件是一个与数据库名相同的目录。
将这个目录下所用文件和子目录全部删除(将删除所用用户以前建立数据!!并不能恢复。)。重新安装mysql。
-------------------------------------------------------------------
常用的linux命令:
最危险、最好用的命令---删除当前目录下所有文件和子目录
rm -fr *