学海无涯学海无涯

I am a slow walker,
but i never walk backwards.

解决mysql: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or directory

这个错误原因很简单,就是没有找到libmysqlclient.so.16,
我们可以用yum来安装它,
命令是:

yum install libmysqlclient.so.16
ln -s /usr/local/mysql/lib/libmysqlclient.so.18  /usr/lib/

照做后仍然报错,原因是该方法适用于32位系统,64位系统应使用下面的这行:

ln -s /usr/local/mysql/lib/libmysqlclient.so.18  /usr/lib64/

一共下载8M多的文件,然后启动mysql,错误消失.

本原创文章未经允许不得转载 | 当前页面:学海无涯 » 解决mysql: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or directory

评论