I have CentOS 6.4 with NGINX.
When I try to start/stop/restart
mysql server (/etc/init.d/mysqld restart)
I get this error:
MySQL server PID file could not be found! [FAILED]
Starting MySQL..The server quit without updating PID file ([FAILED]/mysql/mysqld.pid).
What can I do to solve this problem?
Thanks!
The PID file in the MySQL data directory is gone and MySQL wont behave without it. The default MySQL data directory is /var/lib/mysql/. You can see “. err” files inside the MySQL data directory.
The PID file could not be found error is usually caused by two things: MySQL server is not running, so no PID file was found. A mismatch between the running MySQL instance PID file location and the mysql. server command target location.
I got the same error on a CentOS 6.3 where I upgraded MySQL to 5.6.14 but I kept the old my.cnf file. After upgrade, MySQL did not start anymore, giving me the same error as you described.
The problem was that I had this setting in my.cnf:
table_cache=2048
According to this link table_cache renamed table_open_cache..
"Seem like in 5.5 the system variable table_cache was renamed table_open_cache.. In 5.6 mysqld fails if it finds an unknown variable this means that upgrades from versions earlier than 5.5 can have problems if table_cache is specified in my.cnf."
After I changed the above line to
table_open_cache=2048
MySQL started perfectly.
So, in the case you have MySQL 5.5+ (and maybe an older my.cnf), I suggest you to do the following:
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With