Server Quit Without Updating PID File. I am getting this error with my MySQL server. Please fix it asap!
That was a recent HelpDesk request we received in our Server Management Services.
This error occurs when MySQL upgraded to a later version.
Today, let’s check the error and see how our Support Engineers fix this for our customers.
When does MySQL Server Quit Without Updating PID File
Let’s begin by checking the typical scenario at which the error occurs.
This server quit without updating PID file error usually pops up when MySQL fails to start. This occurs after a recent MySQL upgrade or due to insufficient permission and ownership issues in the MySQL data directory.
In such cases, the PID file in the MySQL data directory goes missing and MySQL won’t work without it.
Recently one of our customers contacted us with the error server quit without updating PID file. When he tried to start the MySQL service it returned the error message.
How we fix Server Quit Without Updating PID File error in MySQL?
MySQL startup errors are quite common. Let’s see how our Support Engineers fix this error for our customers.
1. Restart the MySQL service to fix Server Quit Without Updating PID File.
To solve this error, we begin by restarting the MySQL service. Usually, it resolves this MySQL error.
To do this, we run this below command from the terminal.
We log into the server via SSH.
Then we run this command on the server terminal.
/etc/init.d/mysqld restart
Or
service mysqld restart
Then we check if the MySQL service is already running on the server
For this, we type the following command to determine if there is MySQL service running already.
ps -aux | grep mysql
If MySQL service is already running, we get the list of MySQL processes with PIDs. And then, we kill those processes.
kill -9 PID
// where PID is the process ID of the MySQL processes and restart the MySQL service again.
2. Remove Your MySQL Config File and start again.
Sometimes the modification of the MySQL configuration file also may cause this error. It can be the problem of using an unsupported variable, or something similar.
So the easiest way is to remove the conf file and restart the MYSQL again. The MySQL conf file is automatically rebuilt after the restart of MYSQL service.
1. First we backup the MySQL configuration file using the below command.
mv /etc/my.cnf /etc/my.cnf.backup
2. Then we restart the MYSQL service again.
And, MySQL starts with the following message:
Starting MySQL. SUCCESS!
3. Check ownership of /var/lib/mysql/ directory
Often bad permissions of the MySQL directory can also end up in the error. Here, we check the ownership using:
ll -aF /var/lib/mysql/
If we find it’s the owner is root, then we change the ownership to MySQL using the below command.
chown -R mysql /var/lib/mysql/
4. Removing the error files
At times, the fix may also involve removing any .err files in the data folder or create missing .pid.
For this, we use the below command.
rm *.err /usr/local/mysql/data/
5. Check the MySQL error log file
In all scenarios, we check the MySQL log files to get more details about the error.
/var/lib/mysql/your_doamin_name.err
Or
/var/log/mysql/error.log
From these logs, we get pointers to the exact error and we proceed further.
6. Upgrade to latest MySQL version
Finally, when MySQL service is running in safe mode and displays invalid PID error, then we upgrade the service to latest version.
To ensure this, we first edit the /etc/rc.conf and put the following into the file:
mysql_enable="YES"
mysql_args="--skip-grant-tables --skip-networking"
Then we restart MySQL through rc.d:
/usr/local/etc/rc.d/mysql-server start
Starting MySQL.. SUCCESS!
Then we upgrade the MySQL to the latest version using the following command
mysql_upgrade
That completes the various ways by which we fix the MySQL error for our customers.
[Still having trouble in fixing Server Quit Without Updating PID File error in MySQL? We’ll fix it for you.]
Conclusion
In short, Server Quit Without Updating PID File error happens when MySQL fails to start due to insufficient permission and ownership issues in the MySQL data directory. Today, we saw how our Support Engineers sort out the MYSQL error for our customers.
Hello,
I installed MySQL Community Server and Workbench on MacBook Air. Here are the details of versions,
FROM MySQL Download
MySQL Community Server 8.0.32
macOS 13 (x86, 64-bit), DMG Archive (mysql-8.0.32-macos13-x86_64.dmg)
MySQL Workbench 8.0.32
macOS (x86, 64-bit), DMG Archive (mysql-workbench-community-8.0.32-macos-x86_64.dmg)
Problem: MySQL Server is not starting.
I click the start the server, it asks for PW. I enter. “Start the server” changes to “Stop the server” but it immediately goes back to start the server.
I am not sure what the problem & how to resolve it?
I tried to start from Terminal, it’s error flag seems to be PID file is not updated.
I am not able to solve the problem thru your article suggestions.
Any hep on this is highly appreciated.
Rao Vallabhaneni
Hi Rao,
Our experts can help you with the issue.we will be happy to talk to you through our live chat(click on the icon at right-bottom).
thank you so much i was stack for almost a month