Mysql登陆时提示找不到到libmysqlclient.so.15

      今天发现原先虚拟机的centos系统下的数据库mysql 竟然一直启动不起来  检查啦好久实在是不知道什么原因  配置文件也修改过啦。。还是搞不定  后来想想 算了 反正也没什么资料  重新编译安装下吧。。。    

      按照之前惯例还是选择使用源码编辑安装 可是等安装完后要进入数据库的时候竟然提示说找不到 libmysqlclient.so.15这个文件  应该是一个库文件吧。。。如下提示:

[root@moodle mysql]# bin/mysql -u root -p

bin/mysql: error while loading shared libraries: libmysqlclient.so.15: cannot open shared object   file: No such file or directory


       可是使用find命令查找了下在数据库安装目录下是有libmysqlclient.so.15.0.0及libmysqlclient.so.15这两个文件的啊 

[root@moodle mysql]# find . -name libmysqlclient.so.15                           
    ./lib/mysql/libmysqlclient.so.15                                                                  

    [root@moodle mysql]# find . -name libmysqlclient.so.15.0.0                     
    ./lib/mysql/libmysqlclient.so.15.0.0                                                            

 

       折腾了会  想想可能是由于系统库 /usr/lib/关联起来的原因吧  故觉得试试做了个链接操作

[root@moodle mysql]#sudo ln -s /usr/local/mysql/lib/mysql/libmysqlclient.so.15 /usr/lib        /libmysqlclient.so.15                                                                                                         

 

       还好终于搞定啦。。。但是为什么会这样呢 之前貌似都遇到过。。。 

 

[root@moodle mysql]# bin/mysql -u root -p                                      
     Enter password:                                                                                
     Welcome to the MySQL monitor.  Commands end with ; or /g.          
     Your MySQL connection id is 2                                                           
     Server version: 5.0.67-log Source distribution                                  
                                                                                                          
    Type 'help;' or '/h' for help. Type '/c' to clear the buffer.                    
                                                                                                          
    mysql>                                                                                               

 


 

你可能感兴趣的:(环境配置)