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

Document that hyphens and underscores are mostly interchangeable in option files

    XMLWordPrintable

    Details

      Description

      Hyphens and underscores are interchangeable in option files. For example:

      [ec2-user@ip-172-30-0-249 ~]$ mysql -u root --execute="SHOW GLOBAL VARIABLES LIKE 'connect_timeout';"
      +-----------------+-------+
      | Variable_name   | Value |
      +-----------------+-------+
      | connect_timeout | 10    |
      +-----------------+-------+
      [ec2-user@ip-172-30-0-249 ~]$ sudo tee /etc/my.cnf.d/z.cnf <<EOF
      > [mysqld]
      > connect-timeout=11
      > EOF
      [mysqld]
      connect-timeout=11
      [ec2-user@ip-172-30-0-249 ~]$ sudo systemctl restart mariadb
      [ec2-user@ip-172-30-0-249 ~]$ mysql -u root --execute="SHOW GLOBAL VARIABLES LIKE 'connect_timeout';"
      +-----------------+-------+
      | Variable_name   | Value |
      +-----------------+-------+
      | connect_timeout | 11    |
      +-----------------+-------+
      [ec2-user@ip-172-30-0-249 ~]$ sudo rm /etc/my.cnf.d/z.cnf
      [ec2-user@ip-172-30-0-249 ~]$ sudo tee /etc/my.cnf.d/z.cnf <<EOF
      > [mysqld]
      > connect_timeout=11
      > EOF
      [mysqld]
      connect_timeout=11
      [ec2-user@ip-172-30-0-249 ~]$ sudo systemctl restart mariadb
      [ec2-user@ip-172-30-0-249 ~]$ mysql -u root --execute="SHOW GLOBAL VARIABLES LIKE 'connect_timeout';"
      +-----------------+-------+
      | Variable_name   | Value |
      +-----------------+-------+
      | connect_timeout | 11    |
      +-----------------+-------+
      

      But this doesn't actually seem to be documented here:

      https://mariadb.com/kb/en/library/configuring-mariadb-with-mycnf/

      https://mariadb.com/kb/en/library/mysqld-configuration-files-and-groups/

      https://mariadb.com/kb/en/library/mysqld-options/

      Should we document this somewhere?

        Attachments

          Activity

            People

            Assignee:
            greenman Ian Gilfillan
            Reporter:
            GeoffMontee Geoff Montee
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: