| Bug #87382 | no mention in 5.7 documentation that mysqld.cnf is the authoritative option file | ||
|---|---|---|---|
| Submitted: | 10 Aug 2017 19:39 | Modified: | 11 Aug 2017 13:17 |
| Reporter: | Brock Walters | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server: Documentation | Severity: | S2 (Serious) |
| Version: | 5.7.19-0ubuntu0.16.04.1 | OS: | Ubuntu (16.04.1) |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | cnf, configuration, my.cnf, mysqld.cnf, option-file | ||
[10 Aug 2017 19:39]
Brock Walters
[11 Aug 2017 9:11]
MySQL Verification Team
Hello Brock Walters, Thank you for the report. Imho, this is documented behavior. Quoting from manual - "On Unix and Unix-like systems, MySQL programs read startup options from the files shown in the following table, in the specified order (top files are read first, files read later take precedence)." for table please see - https://dev.mysql.com/doc/refman/5.7/en/option-files.html On my ubuntu 16.10, I see this root@ubuntu16:/home/ushastry# /usr/sbin/mysqld --verbose --help | grep -A 1 "Default options" Default options are read from the following files in the given order: /etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf files read later take precedence, and when I checked contents of /etc/mysql/my.cnf which has again: !includedir /etc/mysql/conf.d/ !includedir /etc/mysql/mysql.conf.d/ So, mysqld read option files found in /etc/mysql/mysql.conf.d/ i.e file names ending in .cnf and thus mysqld.cnf is taking precedence over /etc/my.cnf Thanks, Umesh
[11 Aug 2017 13:10]
Brock Walters
you understand this means that if i follow the instruction AT THE TOP OF the mysqld.cnf file, ie, to copy it to /etc/my.cnf which was the location of the file on previous versions of Ubuntu that what happens is changes I make in /etc/my.cnf AFTER FOLLOWING THE INSTRUCTION AT THE TOP OF THE FILE are not respected, correct? I understand the !includedir action is explained. It's not clear. You should be removing or modifying the text at the top of the file for different flavors of Unix.
[11 Aug 2017 13:17]
Brock Walters
you understand this means that if i follow the instruction AT THE TOP OF the mysqld.cnf file, ie, to copy it to /etc/my.cnf which was the location of the file on previous versions of Ubuntu that what happens is changes I make in /etc/my.cnf AFTER FOLLOWING THE INSTRUCTION AT THE TOP OF THE FILE are not respected, correct? I understand the !includedir action is explained. It's not clear. You should be removing or modifying the text at the top of the file for different flavors of Unix. furthermore, why doesn't the documentation just say SOMEWHERE: "the default option-file on Ubuntu 16.04 is mysqld.cnf" It does not say that anywhere & your circular proof that it does is evidence of just how bad this documentation is.
[11 Aug 2017 13:17]
Brock Walters
you understand this means that if i follow the instruction AT THE TOP OF the mysqld.cnf file, ie, to copy it to /etc/my.cnf which was the location of the file on previous versions of Ubuntu that what happens is changes I make in /etc/my.cnf AFTER FOLLOWING THE INSTRUCTION AT THE TOP OF THE FILE are not respected, correct? I understand the !includedir action is explained. It's not clear. You should be removing or modifying the text at the top of the file for different flavors of Unix. furthermore, why doesn't the documentation just say SOMEWHERE: "the default option-file on Ubuntu 16.04 is mysqld.cnf" It does not say that anywhere & your circular proof that it does is evidence of just how bad this documentation is.
