Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.2, 10.3, 10.4
-
None
Description
As noted in MDEV-19933, modern Debians/Ubuntus have MySQL's my.cnf installed via alternatives:
drwxr-xr-x 2 root root 4096 May 15 2018 conf.d
|
lrwxrwxrwx 1 root root 24 May 15 2018 my.cnf -> /etc/alternatives/my.cnf
|
-rw-r--r-- 1 root root 839 Aug 3 2016 my.cnf.fallback
|
The following admittedly convoluted chain of events can break MariaDB configuration:
- while MySQL's mysql-common is still there, install MariaDB's mysql-common instead – explicitly, because it doesn't get pulled as a dependency:
ii mysql-common 1:10.3.16+maria~stretch all MariaDB database common files (e.g. /etc/mysql/my.cnf)
The cnf file remains as it was, both the alternative and the symlink:
drwxr-xr-x 2 root root 4096 Jun 20 2017 conf.d
lrwxrwxrwx 1 root root 24 Jun 20 2017 my.cnf -> /etc/alternatives/my.cnf
-rw-r--r-- 1 root root 5264 Jun 14 18:25 my.cnf.dpkg-new
-rw-r--r-- 1 root root 839 Jul 9 2016 my.cnf.fallback
- Remove and purge mysql-common. It removes the alternative, but keeps the symlink:
buildbot@debian-9-stretch-amd64:~$ ls -l /etc/mysql/
total 8
lrwxrwxrwx 1 root root 24 Jun 20 2017 my.cnf -> /etc/alternatives/my.cnf
-rw-r--r-- 1 root root 5264 Jun 14 18:25 my.cnf.dpkg-new
buildbot@debian-9-stretch-amd64:~$ ls -l /etc/alternatives/my.cnf
lrwxrwxrwx 1 root root 26 Jun 20 2017 /etc/alternatives/my.cnf -> /etc/mysql/my.cnf.fallback
buildbot@debian-9-stretch-amd64:~$ ls -l /etc/mysql/my.cnf.fallback
ls: cannot access '/etc/mysql/my.cnf.fallback': No such file or directory
- install mariadb-server. It installs mysql-common again as a dependency, but doesn't replace the broken symlink
buildbot@debian-9-stretch-amd64:~$ ls -l /etc/mysql/
total 28
drwxr-xr-x 2 root root 4096 Jul 2 18:30 conf.d
-rw------- 1 root root 333 Jul 2 18:30 debian.cnf
-rwxr-xr-x 1 root root 1525 Jun 14 18:25 debian-start
-rw-r--r-- 1 root root 527 Jun 14 18:25 mariadb.cnf
drwxr-xr-x 2 root root 4096 Jun 14 22:41 mariadb.conf.d
lrwxrwxrwx 1 root root 24 Jun 20 2017 my.cnf -> /etc/alternatives/my.cnf
-rw-r--r-- 1 root root 5264 Jun 14 18:25 my.cnf.dpkg-new
buildbot@debian-9-stretch-amd64:~$ ls -l /etc/alternatives/my.cnf
lrwxrwxrwx 1 root root 26 Jun 20 2017 /etc/alternatives/my.cnf -> /etc/mysql/my.cnf.fallback
buildbot@debian-9-stretch-amd64:~$ ls -l /etc/mysql/my.cnf.fallback
ls: cannot access '/etc/mysql/my.cnf.fallback': No such file or directory
So, no configuration is enabled at all – neither the contents of mariadb.conf.d nor conf.d, thus no plugins etc.