启动Lepus报ImportError: libmysqlclient.so.18: cannot open shared object file

启动lepus的时候报错:
[root@goolen ~]# lepus start
nohup: 把输出追加到"nohup.out"
lepus server start fail!

查看nohup文件内容如下:
[root@goolen lepus]# cat nohup.out 
Traceback (most recent call last):
  File "lepus.py", line 8, in
    import MySQLdb
  File "/usr/lib64/python2.6/site-packages/MySQL_python-1.2.4-py2.6-linux-x86_64.egg/MySQLdb/__init__.py", line 19, in
    import _mysql
ImportError: libmysqlclient.so.18: cannot open shared object file: No such file or directory
Traceback (most recent call last):
  File "lepus.py", line 8, in
    import MySQLdb
  File "/usr/lib64/python2.6/site-packages/MySQL_python-1.2.4-py2.6-linux-x86_64.egg/MySQLdb/__init__.py", line 19, in
    import _mysql
ImportError: libmysqlclient.so.18: cannot open shared object file: No such file or directory

查看 /usr/lib64/python2.6/site-packages/MySQL_python-1.2.4-py2.6-linux-x86_64.egg/MySQLdb/__init__.py 文件第19行内容:

[root@goolen lepus]# sed -n '19p' /usr/lib64/python2.6/site-packages/MySQL_python-1.2.4-py2.6-linux-x86_64.egg/MySQLdb/__init__.py
import _mysql
[root@goolen lepus]# 

[root@goolen lepus]# python
Python 2.6.6 (r266:84292, May  1 2012, 13:52:17) 
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import _mysql
Traceback (most recent call last):
  File "", line 1, in
ImportError: libmysqlclient.so.18: cannot open shared object file: No such file or directory
>>> 

解决:
[root@goolen lepus]# ln -s /tol/mysql/home/lib/libmysqlclient.so.18 /usr/lib64/libmysqlclient.so.18

[root@goolen ~]# lepus start
nohup: 把输出追加到"nohup.out"
lepus server start fail!

查看nohup文件:
    super(Connection, self).__init__(*args, **kwargs2)
_mysql_exceptions.OperationalError: (1045, "Access denied for user 'lepus'@'127.0.0.1' (using password: YES)")

[root@goolen lepus]# mysql -ulepus -plepus
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1155
Server version: 5.5.18-log Source distribution

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> exit
Bye
[root@goolen lepus]# mysql -ulepus -plepus -h127.0.0.1
ERROR 1045 (28000): Access denied for user 'lepus'@'127.0.0.1' (using password: YES)
[root@goolen lepus]# 
[root@goolen lepus]# mysql -ulepus -plepus -hlocalhost
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1158
Server version: 5.5.18-log Source distribution

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> exit
Bye

解决:编辑配置文件:
[root@goolen lepus]# vim etc/config.ini 

###监控机MySQL数据库连接地址###
[monitor_server]
host="localhost"
port=3306
user="lepus"
passwd="lepus"
dbname="lepus"


[root@goolen ~]# lepus start
nohup: 把输出追加到"nohup.out"
lepus server start success!
[root@goolen ~]# lepus status
lepus server is running...

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23249684/viewspace-1475633/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/23249684/viewspace-1475633/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值