2

My question is exactly the same as this one here, Why is “mysqld.pid” and “mysqld.sock” missing from my system even though the values are set in “my.cnf?”.

I followed all the steps provided in the answer, on the last step, I get an error, Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.

How can I solve this? Thanks in advance

ps: I could've asked in the comments section, but I need 50 reputation.

Lesego M
  • 131
  • 1
  • 6
  • @slhck, `journalctl -xe` gives "No journal files were opened due to insufficient permissions." The status shows that it failed. I also ran the command `sudo find / -type s | grep mysqld.sock`, it returned "No such file or directory" for all of them. Does this mean the mysqld.sock file was not created? – Lesego M Jan 25 '18 at 11:08
  • To see the `journalctl` messages you need to be member of a certain user group: `sudo usermod -a -G systemd-journal $(whoami)` – otherwise you can't see the messages. Also look at errors in `/var/log` coming from Apache. – slhck Jan 25 '18 at 11:19

1 Answers1

1

After checking the mysql error log file, there was an error InnoDB: Error: io_setup() failed with EAGAIN after 5 attempts., the solution was to add innodb_use_native_aio = 0 in /etc/mysql/my.cnf file. I then restarted the server. It's working!

Lesego M
  • 131
  • 1
  • 6