[MDEV-13989] Document that hyphens and underscores are mostly interchangeable in option files Created: 2017-10-03  Updated: 2017-10-10  Resolved: 2017-10-10

Status: Closed
Project: MariaDB Server
Component/s: Configuration, Documentation
Fix Version/s: N/A

Type: Task Priority: Major
Reporter: Geoff Montee (Inactive) Assignee: Ian Gilfillan
Resolution: Fixed Votes: 0
Labels: configuration, documentation


 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?



 Comments   
Comment by Ian Gilfillan [ 2017-10-10 ]

This is documented at https://mariadb.com/kb/en/library/server-system-variables/, have also added it to https://mariadb.com/kb/en/library/mysqld-options/

Generated at Thu Feb 08 08:10:03 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.