The MySQL crashed during the night and I can’t retart MySQL now. I don’t know what happens… I tried to connect to my Wordpress dashboard this morning and it doesn’t work anymore. All of 10 websites are down so it’s not a WP issue.
hum yeah this is the first thing I made and this is why I have this error. It doesn’t work. Even in command line. And it takes a very long time to load when I try to restart the mysql service.
Jun 26 17:11:52 vps-6b2ce37c systemd[1]: Starting MariaDB 10.3.22 database server…
Jun 26 17:11:52 vps-6b2ce37c systemd[1]: mariadb.service: Found left-over process 18283 (mysqld) in control group while starting unit. Ignoring.
Jun 26 17:11:52 vps-6b2ce37c systemd[1]: This usually indicates unclean termination of a previous run, or service implementation deficiencies.
Jun 26 17:11:53 vps-6b2ce37c mysqld[5367]: 2020-06-26 17:11:53 0 [Note] /usr/sbin/mysqld (mysqld 10.3.22-MariaDB-0+deb10u1) starting as process 5367 …
Jun 26 17:12:26 vps-6b2ce37c systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Jun 26 17:27:26 vps-6b2ce37c systemd[1]: mariadb.service: State ‘stop-sigterm’ timed out. Skipping SIGKILL.
and a lot of lines like these one:
postfix/smtpd[7143]: disconnect from unknown[185.143.75.153] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4
postfix/smtpd[3326]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
postfix/smtpd[3326]: warning: unknown[185.143.75.81]: SASL LOGIN authentication failed: generic failure
postfix/smtpd[16653]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
postfix/smtpd[16653]: warning: unknown[212.70.149.34]: SASL LOGIN authentication failed: generic failure
postfix/smtpd[8319]: connect from unknown[46.38.145.6]
postfix/smtpd[11534]: connect from unknown[46.38.150.37]
postfix/smtpd[3326]: disconnect from unknown[185.143.75.81] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4
postfix/smtpd[16653]: disconnect from unknown[212.70.149.34] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4
postfix/smtpd[8322]: connect from unknown[46.38.148.2]
postfix/smtpd[16869]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
postfix/smtpd[16869]: warning: unknown[46.38.145.254]: SASL LOGIN authentication failed: generic failure
postfix/smtpd[16869]: disconnect from unknown[46.38.145.254] ehlo=1 auth=0/1 rset=1 quit=1 commands=3/4
postfix/smtpd[16653]: connect from unknown[46.38.148.6]
postfix/smtpd[2901]: connect from unknown[46.38.150.47]
Someone has removed the Unix socket file that mysqld uses (/tmp/mysql.sock by default). For example, you might have a cron job that removes old files from the /tmp directory. You can always run mysqladmin version to check whether the Unix socket file that mysqladmin is trying to use really exists. The fix in this case is to change the cron job to not remove mysql.sock or to place the socket file somewhere else. See Section B.5.4.5, “How to Protect or Change the MySQL Unix Socket File”.
But why the mysql.socket would be in the /tmp folder instead of another one? I don’t know where I can find the cron jobs to see if one of them could be related with that.
warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Restart saslauthd service by running:
systemctl restart saslauthd
Check for the out put of:
lsof /var/run/mysqld/mysqld.sock
mariadb.service: Found left-over process 18283 (mysqld) in control group while starting unit. Ignoring.
Check on this process as well.
I would simply check configuration file(s) for MariaDB and its socket directive and made sure that the path is accessible (has correct permissions) and actually exists.
As an extra measure try rebooting your server.
Note: You might face this issue again in the future, and I assume the solution would be is to increase RAM or re-configure your services accordingly -
It works now after the reboot of the VPS. Pretty weird. I don’t know why the restart of Webmin didn’t change anything, but the reboot of VPS solved the issue. I don’t understand… but glad it works now.
Thanks for the suggestion @Ilia ! I spent my day on that just for a simple reboot -_-