0

I am suddenly not able to start mysql service

/etc/init.d/mysql start
Starting MySQL...... ERROR! The server quit without updating PID file (/var/lib/mysql/mysql.pid).

I have tried to do the following but still not working

chmod -R 777 /var/lib/mysql

I am able to run mysqld_safe

    180114 23:05:07 mysqld_safe Logging to '/var/lib/mysql-error/mysql-error.err'.
    180114 23:05:07 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
180114 23:05:11 mysqld_safe mysqld from pid file /var/lib/mysql/mysql.pid ended

But when i check for status I get following message

[root@host ~]# service mysql status
 ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists
all_techie
  • 101
  • 1

1 Answers1

1

Just in case, make sure your mysql is not running: ps uax | grep mysql. If not — just delete the lock file: rm /var/lock/subsys/mysql.

Then you should be able to restart mysql normally.

Kotoniu
  • 36
  • 3