'ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/usr/local/mysql/data/mysql.sock' (2)
MySql randomly stopped working. ive tried EVERYTHING to fix it but i havnt been successfull.
heres the output from "service mysql status"
* mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2022-05-12 09:55:36 MSK; 1min 52s ago
Process: 668983 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=1/FAILURE)
CPU: 8ms
May 12 09:55:36 myhiddenthostname.com systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
May 12 09:55:36 myhiddenthostname.com systemd[1]: Stopped MySQL Community Server.
May 12 09:55:36 myhiddenthostname.com systemd[1]: mysql.service: Start request repeated too quickly.
May 12 09:55:36 myhiddenthostname.com systemd[1]: mysql.service: Failed with result 'exit-code'.
May 12 09:55:36 myhiddenthostname.com systemd[1]: Failed to start MySQL Community Server.
Heres the output from "journalctl -xe"
-- A start job for unit mysql.service has finished with a failure.
--
-- The job identifier is 16383 and the job result is failed.
May 12 09:59:12 myhiddenhostname.com systemd[1]: mysql.service: Scheduled restart job, restart counter is at 5.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Automatic restarting of the unit mysql.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
May 12 09:59:12 myhiddenhostname.com systemd[1]: Stopped MySQL Community Server.
-- Subject: A stop job for unit mysql.service has finished
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A stop job for unit mysql.service has finished.
--
-- The job identifier is 16453 and the job result is done.
May 12 09:59:12 myhiddenhostname.com systemd[1]: mysql.service: Start request repeated too quickly.
May 12 09:59:12 myhiddenhostname.com systemd[1]: mysql.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit mysql.service has entered the 'failed' state with result 'exit-code'.
May 12 09:59:12 myhiddenhostname.com systemd[1]: Failed to start MySQL Community Server.
-- Subject: A start job for unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit mysql.service has finished with a failure.
--
-- The job identifier is 16453 and the job result is failed.
Any help or suggestions is needed. would really appreciate a response or suggestion as all my clients are experiencing downtime because of this.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
