PID file was not created automatically after unexpected server reboot.
Posted by: Amarnath Hebbar
Date: March 06, 2023 09:19AM

Hi,
we have Mysql community edition 5.7 on our servers and Centos7 as OS. There was an unexpected server reboot. Usually after the reboot, the Mysql services would be automatically up and running. But this time, the services were not able to start automatically. We encountered following errors:
1. [ERROR] /usr/sbin/mysqld: Can't create/write to file '/var/run/mysqld/mysqld.pid' (Errcode: 13 - Permission denied)
AND
2. [ERROR] Can't start server: can't create PID file: Permission denied.

After running the following command, the services were able to get started:
chown mysql:mysql /var/run/mysqld

I need to know the reason why PID file could'nt be created automatically like it usually does.

And, also, it would be great if someone help me understand, if any of the mysql processes caused the reboot (by either consuming a lot of memory or CPU)? In mysql error logs, there is no entry related to any query getting stuck, it just has entries of mysql shutting down.

Options: ReplyQuote


Subject
Written By
Posted
PID file was not created automatically after unexpected server reboot.
March 06, 2023 09:19AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.