MySQL starting with two pids

Hi Everyone,

When I was starting mysql , it is starting with two pid process ids are created and not starting the service.

Can you please suggest how to clear this issue.

Hello @bKumar,
Stop the mysql service. Check the service file does not have 2 execute lines for MySQL. Also check your /etc/my.cnf and make sure there are not multiple [mysqld] sections.

Hi @matthewb ,

Yes after killing systemctl start mysqld. Only one pid is running but this killing required every time of restart of service.

No we dont have two execute lines in mysqld.service
We have only one mysqld section.


Let me understand the process. 1) Kill all mysql. No mysql running. 2) systemctl start mysql. this creates 1 instance of mysql / 1 pid. Correct? 3) systemctl restart mysql this does not stop old mysql but starts a new mysql instance/pid. Correct?

Hi @bKumar,
I may have an explanation. So, when mysqld starts, it performs a “double fork” to detach the process from the controlling tty. When there is a need to perform things like InnoDB recovery, the “child” part of the double fork takes time to signal the parent to die. What is mysqld doing in terms of CPU and IOPs?