We had an issue with a server where we ran out of disk space. One of my developers upped the size of our server on digital ocean, and we did the following:
- Powered off the server via SSH
- Started the server again in Digital Ocean and checked to confirm it saw the increased space using
sudo df -hon the root to see that there was available space (there is now 20gb available)
- Restarted apache successfully
- Attempted to restart mysql using
sudo service mysql restart, and got the following failure error
Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.
systemctl status mysql and got the following error info:
mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Fri 2021-06-11 15:59:30 UTC; 32s ago Process: 3030 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS) Process: 3038 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE) Main PID: 3038 (code=exited, status=1/FAILURE) Status: "Server startup in progress" Error: 2 (No such file or directory) Jun 11 15:59:29 Sites-Mydigital systemd(1): Failed to start MySQL Community Server. Jun 11 15:59:30 Sites-Mydigital systemd(1): mysql.service: Scheduled restart job, restart counter is at 5. Jun 11 15:59:30 Sites-Mydigital systemd(1): Stopped MySQL Community Server. Jun 11 15:59:30 Sites-Mydigital systemd(1): mysql.service: Start request repeated too quickly. Jun 11 15:59:30 Sites-Mydigital systemd(1): mysql.service: Failed with result 'exit-code'. Jun 11 15:59:30 Sites-Mydigital systemd(1): Failed to start MySQL Community Server.
I attempted shutting down mysql via
systemctl mysql stop and it seems to work however running status gets me the same error as above once again.
I then tried to check
php.ini to see if there is a socket set/where it is and if it exists in my files but it seems the socket is not set in php.ini:
(Pdo_mysql) ; Default socket name for local MySQL connects. If empty, uses the built-in ; MySQL defaults. pdo_mysql.default_socket=
So I went to see if a socket exists in
/var/lib/mysql/mysql.sock and this does not exist, there is also no mysql folder in
I’m not sure what to do next. Did something get deleted? How do I fix this! Where else can I look for more info?