Laravel & Php

Job for mysql.service failed because a fatal signal was delivered to the control process.


How to fix “Job for mysql.service failed because a fatal signal was delivered to the control process. See “systemctl status mysql.service” and “journalctl -xe” for details.” on ubuntu server

First create the mysqld/ directory in /var/run/ like this:

sudo mkdir -p /var/run/mysqld/

Then create a mysqld.pid file with touch:

sudo touch /var/run/mysqld/mysqld.pid

Next create a mysqld.sock file with touch:

sudo touch /var/run/mysqld/mysqld.sock

Now change the ownerships of the directory and files to mysql:mysql like this:

sudo chown mysql:mysql -R /var/run/mysqld

And restart MySQL like this to get those files set and created:

sudo service mysql restart

When that’s all done, MySQL will be able to to create the mysqld.pid and mysqld.sock files as expected.

Option 2

 Added this to path /etc/mysql/my.cnf

[mysql]
innodb_force_recovery = 1

If you use mysqld use this:

[mysqld]
innodb_force_recovery = 1

Linux Mysql
Share with Friends

Like this chef? Share with friends..