Some cases you will may face to get this error on MySQL service.
root@ [~]# /etc/init.d/mysql status
ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists
If you've got above error just remove the " MySQL lock file " and restart the server.
root@ [~]# rm /var/lock/subsys/mysql
rm: remove regular empty file `/var/lock/subsys/mysql’? y
If you may get the following pid error while restarting the mysqld service,
—————————
root@ [~]# /etc/init.d/mysql restart
ERROR! MySQL server PID file could not be found!
Starting MySQL… ERROR! The server quit without updating PID file (/var/lib/mysql/hostname.pid).
—————————
In this case check the MySQL process and kill it.
———————
root@ [~]# ps aux | grep mysql
root 32616 0.0 0.0 107412 864 pts/3 S+ 11:14 0:00 grep mysql
——————–
Here, there is no more MySQL process, so I need to check the MySQL log.
Sample log:
Edit the my.cnf file and #hash the enrty then start the MySQL.
—————
root@ [~]# /etc/init.d/mysql start
Starting MySQL.. SUCCESS!
root@ [~]#
—————
That's it. :-)
root@ [~]# /etc/init.d/mysql status
ERROR! MySQL is not running, but lock file (/var/lock/subsys/mysql) exists
If you've got above error just remove the " MySQL lock file " and restart the server.
root@ [~]# rm /var/lock/subsys/mysql
rm: remove regular empty file `/var/lock/subsys/mysql’? y
If you may get the following pid error while restarting the mysqld service,
—————————
root@ [~]# /etc/init.d/mysql restart
ERROR! MySQL server PID file could not be found!
Starting MySQL… ERROR! The server quit without updating PID file (/var/lib/mysql/hostname.pid).
—————————
In this case check the MySQL process and kill it.
———————
root@ [~]# ps aux | grep mysql
root 32616 0.0 0.0 107412 864 pts/3 S+ 11:14 0:00 grep mysql
——————–
Here, there is no more MySQL process, so I need to check the MySQL log.
Sample log:
—————If the issue still persist please check the MySQL log may be there is any incorrect entry on my.cnf file.
130728 11:23:45 [ERROR] /usr/sbin/mysqld: unknown variable ‘set-variable=max_user_connections=50′
130728 11:23:45 [ERROR] Aborting
130728 11:23:45 InnoDB: Starting shutdown…
130728 11:23:45 InnoDB: Shutdown completed; log sequence number 2153996
130728 11:23:45 [Note] /usr/sbin/mysqld: Shutdown complete
130728 11:23:45 mysqld_safe mysqld from pid file /var/lib/mysql/hostname.pid ended
—————
Edit the my.cnf file and #hash the enrty then start the MySQL.
—————
root@ [~]# /etc/init.d/mysql start
Starting MySQL.. SUCCESS!
root@ [~]#
—————
That's it. :-)
No comments:
Post a Comment