HostOnNet Blog

MySql not starting on new cpanel server

Looking for Linux Server Admin or WordPress Expert? We can help.

On new cpanel server, MySQL is not starting.


# service mysql start
Starting MySQLCouldn't find MySQL manager or server [FAILED]
#

Can’t find anything in log file /var/log/mysql.log

I tried removing rpm of mysql and resinstalled mysql with /scripts/mysqlup –force

But it do not solved the mysql problem.

I modified /etc/my.cnf and mysql start working


root@server42 [/var/lib]# 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]#

Changed to


# 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
#

The line removed is

basedir=/var/lib

Posted in Cpanel Server, MySQL. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.