Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-26444

defaults-group-suffix not working for /etc/my.cnf.d mysqld configuration files

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Not a Bug
    • Affects Version/s: 10.5.9
    • Fix Version/s: N/A
    • Component/s: OTHER
    • Labels:
      None
    • Environment:
      CentOS Linux release 8.4.2105

      Description

      Hi,
      I am configuring multiple mariadb instances.

      I created a /etc/my.cnf.d/instance1.cnf :

      [mysqld.inst1]
      datadir = /opt/data/mariadb/inst1
      socket = /var/lib/mysql/mysql-inst1.sock
      pid-file = /run/mariadb/mariadb-inst1.pid
      port = 3301
      innodb_file_per_table = 1
      

      And I also created an instance2 in /etc/my.cnf

      [mysqld.inst2]
      datadir = /opt/data/mariadb/inst2
      socket = /var/lib/mysql/mysql-inst2.sock
      pid-file = /run/mariadb/mariadb-inst2.pid
      port = 3302
      innodb_file_per_table = 1
      

      It looks like only instance 2 is working as expected ( the one in /etc/my.cnf )

      I tried :

      ]# /usr/bin/my_print_defaults --defaults-group-suffix=.inst2 mysqld
      --datadir=/var/lib/mysql
      --socket=/var/lib/mysql/mysql.sock
      --log-error=/var/log/mariadb/mariadb.log
      --pid-file=/run/mariadb/mariadb.pid
      --bind_address=0.0.0.0
      --datadir=/opt/data/mariadb/inst2
      --socket=/var/lib/mysql/mysql-inst2.sock
      --pid-file=/run/mariadb/mariadb-inst2.pid
      --port=3302
      --innodb_file_per_table=1
      

      and

      ]# /usr/bin/my_print_defaults --defaults-group-suffix=.inst1 mysqld
      --datadir=/opt/data/mariadb/inst1
      --socket=/var/lib/mysql/mysql-inst1.sock
      --pid-file=/run/mariadb/mariadb-inst1.pid
      --port=3301
      --innodb_file_per_table=1
      --datadir=/var/lib/mysql
      --socket=/var/lib/mysql/mysql.sock
      --log-error=/var/log/mariadb/mariadb.log
      --pid-file=/run/mariadb/mariadb.pid
      --bind_address=0.0.0.0
      

      It looks like /usr/bin/my_print_defaults is picking up the /etc/my.cnf.d/mariadb-server.cnf [mysqld] section , because when I removed it from the file it works.

      I assume /usr/bin/my_print_defaults --defaults-group-suffix=.inst1 should only pick up [mysqld.inst1] sections ...

      Thanks for having a look at this potential issue !

      Best regards
      Oleg

        Attachments

          Activity

            People

            Assignee:
            serg Sergei Golubchik
            Reporter:
            sladkofo Oleg Sladkoff
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration