This kind of specific configuration should be put on the "conf.d/" directory and under a "[mariadb]" tag as its specific to it. As it should be possible for the install not to fail if the passwordless configuration failed (or ideally if there was a choice and the user chose not to use it). Adding this directly on the "my.cnf" will be a real mess for users who just re-use generic "my.cnf" from other installs (or from a template) that could be cross-compatible between distros and with older versions of MariaDB or even with MySQL. And that way it will be easier to maintain changes to my.cnf and to this authentication config file when doing packages upgrade. Another possibility is to reuse the "debian-start" and "debian.cnf" mechanism which was adding "--defaults-file=/etc/mysql/debian.cnf" to mysql* commands but it doesnt sounds as clean and portable as to use conf.d in case the datadir and /etc/mysql would be ported to a different distro (or to a generic "tar" version of MariaDB) without keeping the debian init script (its a bit far fetched, i know but i saw that in the past). Le 06/04/2015 12:32, Otto Kekäläinen a écrit :
Hello!
2015-04-06 13:12 GMT+03:00 Daniel Cialdella Converti <dcialdella@gmail.com>:
root@d7:/etc/mysql# ll -lailR .: total 48 1055141 drwxr-xr-x 4 root root 4096 Apr 6 12:10 . 1044481 drwxr-xr-x 141 root root 12288 Apr 6 11:04 .. 1055175 drwxr-xr-x 2 root root 4096 Apr 6 11:03 conf.d 1044616 -rw------- 1 root root 277 Mar 26 11:57 debian.cnf 1045134 -rw------- 1 root root 333 Feb 23 09:07 debian_old_config.fsDTDb 1055184 -rwxr-xr-x 1 root root 1312 Feb 3 04:34 debian-start 1055178 -rw-r--r-- 1 root root 744 Feb 9 20:21 mariadb.cnf 1055147 drwxr-xr-x 2 root root 4096 Mar 24 10:03 mariadb.conf.d 1055143 -rw-r--r-- 1 root root 3540 Apr 6 11:09 my.cnf 1055174 -rw-r--r-- 1 root root 3506 Feb 16 11:49 my.cnf.dpkg-old
The mariadb-common postinstall script was supposed to run:
mv -f /etc/mysql/my.cnf /etc/mysql/my.cnf.old ln -sf mariadb.cnf /etc/mysql/my.cnf
It does not seem to have happened for some reason..
What if you Daniel C run those two lines manually (as root)?