Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
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?