Can't start mysql

October 31, 2018 5.3k views
Debian 9 MySQL

I can’t start mysql since I resize to droplet

root@ohmygodzilla:~# systemctl status mariadb.service
● mariadb.service - MariaDB database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2018-10-31 02:25:05 UTC; 3min 32s ago
Process: 9847 ExecStart=/usr/sbin/mysqld $MYSQLDOPTS $WSREPNEWCLUSTER $WSREPSTARTPOSITION (code=exited, status=1/FAILURE)
Process: 9758 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera
recovery ] && VAR= || VAR=/usr/bin/galera_recovery; [ $? -eq 0 ] && s
Process: 9754 ExecStartPre=/bin/sh -c systemctl unset-environment WSREPSTART_POSITION (code=exited, status=0/SUCCESS)
Process: 9751 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Main PID: 9847 (code=exited, status=1/FAILURE)
Status: “MariaDB server is down”

Oct 31 02:25:02 ohmygodzilla systemd[1]: Starting MariaDB database server…
Oct 31 02:25:02 ohmygodzilla mysqld[9847]: 2018-10-31 2:25:02 140680916444096 [Note] /usr/sbin/mysqld (mysqld 10.1.26-MariaDB-0+deb9u1) s
Oct 31 02:25:05 ohmygodzilla systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Oct 31 02:25:05 ohmygodzilla systemd[1]: Failed to start MariaDB database server.
Oct 31 02:25:05 ohmygodzilla systemd[1]: mariadb.service: Unit entered failed state.
Oct 31 02:25:05 ohmygodzilla systemd[1]: mariadb.service: Failed with result ‘exit-code’.

1 comment
  • root@ohmygodzilla:~# sudo service mysql start
    Job for mariadb.service failed because the control process exited with error code.
    See “systemctl status mariadb.service” and “journalctl -xe” for details.

2 Answers

Check the mysql log for the startup sequence. It will show errors there. It’s usually under /var/log/mysql*

I have encountered the same problem Ubuntu 18.04 with MariaDb 10.3.13. I found potential solutions at https://mariadb.com/kb/en/library/what-to-do-if-mariadb-doesnt-start/ but so far no luck.

Have another answer? Share your knowledge.