[Bug 1091084] New: Mariadb is unable to follow configurations as defined in /etc/my.cnf
http://bugzilla.opensuse.org/show_bug.cgi?id=1091084 Bug ID: 1091084 Summary: Mariadb is unable to follow configurations as defined in /etc/my.cnf Classification: openSUSE Product: openSUSE Distribution Version: Leap 42.3 Hardware: x86-64 OS: openSUSE 42.3 Status: NEW Severity: Critical Priority: P5 - None Component: Other Assignee: bnc-team-screening@forge.provo.novell.com Reporter: jcdole@free.fr QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- Created attachment 768411 --> http://bugzilla.opensuse.org/attachment.cgi?id=768411&action=edit 2 Tests with mariadb and 1 Test with mysql-community-server Mariadb is unable to follow configurations as defined in /etc/my.cnf
From initial /etc/my.cnf :
[Code] # If you want to use mysqld_multi uncomment 1 or more mysqld sections # below or add your own ones. # WARNING # -------- # If you uncomment mysqld1 than make absolutely sure, that database mysql, # configured above, is not started. This may result in corrupted data! # # [mysqld1] # port = 3306 # datadir = /var/lib/mysql # pid-file = /var/lib/mysql/mysqld.pid # socket = /var/lib/mysql/mysql.sock # user = mysql # [mysqld2] # port = 3307 # datadir = /var/lib/mysql-databases/mysqld2 # pid-file = /var/lib/mysql-databases/mysqld2/mysql.pid # socket = /var/lib/mysql-databases/mysqld2/mysql.sock # user = mysql ..... ..... ..... [/Code] from mysql@.service [Code] ..... ..... ..... [Unit] Description=MySQL server - %I instance Wants=basic.target PartOf=mysql.target After=basic.target network.target syslog.target [Service] Restart=on-abort Type=simple ExecStartPre=/usr/lib/mysql/mysql-systemd-helper install %i ExecStartPre=/usr/lib/mysql/mysql-systemd-helper upgrade %i ExecStart=/usr/lib/mysql/mysql-systemd-helper start %i ExecStartPost=/usr/lib/mysql/mysql-systemd-helper wait %i [Install] WantedBy=multi-user.target ..... ..... ..... [/Code]
From mysql-systemd-helper which is called with the instance number
Multiple instances problem 1 : datadir path does not follow what could be in /etc/my.cnf [Code] ..... ..... ..... if [[ -z "$INSTANCE" ]]; then datadir=/var/lib/mysql socket="/var/run/mysql/mysql.sock" else datadir="/var/lib/mysql-$INSTANCE" socket="/var/run/mysql/mysql.${INSTANCE}.sock" fi ..... ..... ..... [/Code] Multiple instances problem 2 : /etc/my.cnf is not read [Code] .... .... .... if [[ -n "$INSTANCE" ]]; then opts="$(/usr/bin/my_print_defaults mysqld mysqld_multi "$INSTANCE")" tmp_opts="$opts" config="/etc/my${INSTANCE}.cnf" else opts="$(/usr/bin/my_print_defaults mysqld)" tmp_opts="$opts" config="/etc/my.cnf" fi .... .... .... [/Code] This point can be solved by splitting mysqld% from /etc/my.cnf in /etc/my${INSTANCE}.cnf even if I prefer to have every things in the same file. But for the first problem what can I do ? I have modified mysql-systemd-helper to read datadir, and socket from /etc/my.cnf (for [mysqld%] ) ( The modified file is there : http://paste.opensuse.org/77682310 ) But it seems not to be enough. Multiple instances problem 3 : /etc/my.cnf and/or /etc/my{%i}.cnf not read again If you configure the instance in a separate file as mysql-systemd-helper expect it, it is not sufficient. You got an error : [Code] avril 26 12:31:40 ASUS-G75VW-JC mysql-systemd-helper[7795]: 2018-04-26 12:31:40 0 [Warning] Can't create test file /var/lib/mysql/ASUS-G75VW-JC.lower-test avril 26 12:31:40 ASUS-G75VW-JC mysql-systemd-helper[7795]: 2018-04-26 12:31:40 0 [Note] /usr/sbin/mysqld (mysqld 5.6.39) starting as process 7795 ... avril 26 12:31:40 ASUS-G75VW-JC mysql-systemd-helper[7795]: 2018-04-26 12:31:40 7795 [Warning] Can't create test file /var/lib/mysql/ASUS-G75VW-JC.lower-test avril 26 12:31:40 ASUS-G75VW-JC mysql-systemd-helper[7795]: 2018-04-26 12:31:40 7795 [Warning] Can't create test file /var/lib/mysql/ASUS-G75VW-JC.lower-test avril 26 12:31:40 ASUS-G75VW-JC mysql-systemd-helper[7795]: /usr/sbin/mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 2 - No such file or directory) avril 26 12:31:40 ASUS-G75VW-JC mysql-systemd-helper[7795]: 2018-04-26 12:31:40 7795 [ERROR] Aborting avril 26 12:31:40 ASUS-G75VW-JC mysql-systemd-helper[7795]: 2018-04-26 12:31:40 7795 [Note] Binlog end avril 26 12:31:40 ASUS-G75VW-JC mysql-systemd-helper[7795]: 2018-04-26 12:31:40 7795 [Note] /usr/sbin/mysqld: Shutdown complete avril 26 12:31:40 ASUS-G75VW-JC systemd[1]: mysql@2.service: Main process exited, code=exited, status=1/FAILURE [/Code] Any help is welcome. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1091084
http://bugzilla.opensuse.org/show_bug.cgi?id=1091084#c1
Andreas Stieger
http://bugzilla.opensuse.org/show_bug.cgi?id=1091084
Jean-Claude Dole
http://bugzilla.opensuse.org/show_bug.cgi?id=1091084
http://bugzilla.opensuse.org/show_bug.cgi?id=1091084#c2
--- Comment #2 from Jean-Claude Dole
participants (1)
-
bugzilla_noreply@novell.com