Fixing MariaDB Socket Crash Error
If one day you try to start your MariaDB server hosted on Zampto.net and you encounter an error like:
[3:30:10 PM] \[INFO] Server status: starting
:/home/container$ { /usr/sbin/mariadbd --defaults-file=/home/container/.my.cnf & } && while [ ! -S /home/container/run/mariadbd/mariadbd.sock ]; do sleep 0.5; done && mariadb -u container
ERROR 2002 (HY000): Can't connect to local server through socket '/home/container/run/mariadbd/mariadbd.sock' (111)
[3:30:09 PM] [INFO] Server status: offline
If your server crashes with this error or similar, it is possible to fix it — this usually happens when a server gets killed unexpectedly.
How to Fix It
BEFORE ATTEMPTING THE FIX, PLEASE PERFORM A BACKUP OF YOUR DATA (Server), possibly to your device. Use the following fix at your own risk.
-
Access your server files, for example through the File Manager.
-
Go to the folder
/run/mariadbd(/home/container/run/mariadbd) and delete the two files inside — or only the one that exists:-
mariadbd.pid -
mariadbd.sock
-
-
Once deleted, simply start the server again and it should work.