[MDEV-12524] mysql* ignores runtime-specified "--defaults-extra-file" my.cnf override path Created: 2017-04-19 Updated: 2017-05-18 Resolved: 2017-05-18 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Configuration, Documentation, Scripts & Clients, Server |
| Affects Version/s: | N/A |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | pgnd | Assignee: | Ian Gilfillan |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
I launch MariaDB 10.2 via systemd with
So that
Noting in the kb Configuring MariaDB with my.cnf: Location in Linux, Unix, Mac identifies locations & inheritance hierarchy for my.cnf. With configs
on (re)exec
I can successfully connect as 'root'; e.g.
But, if I move credentials to the 'defaults-extra-file',
and (re)exec
client access fails
However, if I instead
It now succeeds
This since client does NOT appear to search the specified 'defaults-extra-file' path, but DOES '~/.my.cnf',
|
| Comments |
| Comment by Elena Stepanova [ 2017-04-19 ] | |||||||||
|
I think you are misinterpreting the way the option works (which is not surprising, because the documentation is not clear about it and needs to be improved). I see two problems in the usage that you have described. Server What the documentation is trying to say is this.
and no other cnf files (for simplicity). /etc/my.cnf is so-called "global" config file, which is defined by its location/name. Now, if you start the server as
it will read both /etc/my.cnf and ~/.my.cnf, in this order, and nothing else. If you start the server as
it will read /etc/my.cnf, /tmp/my_extra.cnf and ~/.my.cnf, in this order, and nothing else. If you start the server as
it will read only /tmp/my_main.cnf and nothing else. And even if you start the server as
it will still read only /tmp/my_main.cnf, and nothing else. The last variant is what you have, so your server does not read the extra file, the option in the service configuration is redundant. Client But what you are actually trying to do is to make the clients read the extra file. Providing it to the server does not do it, clients don't know and don't care which config files the server is reading. If you want the client to use it, you need to run the client with this option.
Please let us know if the above explains the problem you are facing. If it does, the issue will be forwarded to documentation. | |||||||||
| Comment by Ian Gilfillan [ 2017-05-18 ] | |||||||||
|
Documentation has been expanded |