SCHAPPY — 8. July 2019, 12:49

Solved: Debian 10 (buster): Upgrade MariaDB from version 10.1 to version 10.3

Issue: After upgrading Debian, you will have to remove the old version of MariaDB and install the new one (semi-manual). After installation of MariaDB 10.3 it fails to start and mysql.error log does not contain helpful hints.

/etc/init.d/mysql start
[....] Starting mysql (via systemctl): mysql.serviceJob for mariadb.service failed because the control process exited with error code.
See "systemctl status mariadb.service" and "journalctl -xe" for details.

Solution: The installation script of MariaDB assumes the systemd service to be disabled, but it might be active from older installation.

Try /etc/init.d/mysql status and investigate output. If it is similar to mine (as printed below), go on…

mariadb.service - MariaDB 10.3.15 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2019-07-08 14:37:46 CEST; 1min 25s ago
Docs: man:mysqld(8)
Process: 5002 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=127)
Main PID: 22611 (code=exited, status=0/SUCCESS)

Let us try to disable the old systemd service as follows:

sudo systemctl disable mysql
Synchronizing state of mysql.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable mysql
insserv: warning: current start runlevel(s) (empty) of script `mysql' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `mysql' overrides LSB defaults (0 1 6).
Removed /etc/systemd/system/
Removed /etc/systemd/system/mysqld.service.
Removed /etc/systemd/system/mysql.service.

Now try to start the service:
/etc/init.d/mysql start
[ ok ] Starting mysql (via systemctl): mysql.service.

No Comments »

RSS feed for comments on this post.

Bisher noch keine Kommentare.

Kommentare verfassen

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>