Jul
09
Posted on 09-07-2007
Filed Under (WHM/Cpanel) by Arun Bagul

Introduction – After fresh installation of cPanel server, Whenever I have tried to start MySQL server, it has failed to start due to unknown reason. This is really crazy problem on cPanel!. Even you upgrade MySQL from 4.0 to latest 5.x version, MySQL server simply failed to start!! You will not find any thing in log file ie ” /var/log/mysql.log“. I have tried so many thing to find out the reason of failure. If you try this cPanel /scripts/mysqlup –force command still it won’t help you.

What is the Solution?

The solution to this crazy problem is to remove or comment out the “basedir=/var/lib” line from my.cnf configuration file of MySQL server.

root@cpanel.arunbagul:~# cat /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
root@server42 [/var/lib]#

root@cpanel.arunbagul:~#

** Finally the /etc/my.cnf file looks like –

root@cpanel.arunbagul:~# cat /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

[mysql.server]
user=mysql

[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

root@cpanel.arunbagul:~#

** Now you can start your MySQL server on cPanel server!!

Cheers,

Arun Bagul

Similar Posts:

Be Sociable, Share!
(0) Comments    Read More   
Post a Comment
Name:
Email:
Website:
Comments:


www.flickr.com
arunbagul's photos More of arunbagul's photos
Get Adobe Flash player
-->