-
September 1st, 2009 09:32 PM #1
addhost mysqldb error
ok, i was able to reproduce the error describe before when install kusu1.1/CenteOS5.3.
after installing kusu and all kits, starting addhost yields this error (which i did not encounter with the OCS5/RHEL5 install on a dell cluster)
File"/opt/kusu/lib/plugins/addhost/10-cacti.py", line 19 in ? from MySQLdb import *, ImportError: no module named MySQLdb
Digging around reveals the API for mysql for python is missing, so add it:
yum install MySQL-python
then test in interactive python
python
import MySQLdb
^D
now when starting addhost, it complains it can not connect to mysql database. Because checkconfig is off at all levels, mysql never started.
chkconfig mysqld on
you have to add user mysql, after this reset home dir for this user to /var/lib/mysql in /etc/passwd
adduser mysql
and perhaps make sure files are owned correctly
chown -R mysql:mysql /var/lib/mysql
chown -R mysql:mysql /var/run/mysql
and maybe remove (for a clean start)
rm -f /var/lock/subsys/mysqld
Now you can start addhost cleanly without a complaint.
-Henk
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules