[Maria-developers] MariaDB config files order
Hi guys, maybe I just need some little kick or I should get a coffee, but I can't understand the following config file ordering difference. Reading [1] and code in mariadb-5.5.32/mysys/default.c:1226, it looks like expected order of config files in Linux should be: /etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf However, when asking for that using --help --verbose, I get a bit different output: $ /usr/libexec/mysqld --help --verbose 2>/dev/null | grep --after=1 '^Default options' | tail -n 2 Default options are read from the following files in the given order: /etc/mysql/my.cnf /etc/my.cnf ~/.my.cnf I don't understand why /etc/my.cnf is not on the first place in that output. Can somebody give me a hint? Am I just blind? Just FTR I'm trying that on Fedora 19, but there are no changes in Fedora packages that would do anything related, so I guess the same result would be in other distros as well. [1] https://kb.askmonty.org/en/mysqld-startup-options/ Cheers, Honza
Hi!
"Honza" == Honza Horak <hhorak@redhat.com> writes:
Honza> Hi guys, Honza> maybe I just need some little kick or I should get a coffee, but I can't Honza> understand the following config file ordering difference. Honza> Reading [1] and code in mariadb-5.5.32/mysys/default.c:1226, it looks Honza> like expected order of config files in Linux should be: Honza> /etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf Honza> However, when asking for that using --help --verbose, I get a bit Honza> different output: Honza> $ /usr/libexec/mysqld --help --verbose 2>/dev/null | grep --after=1 Honza> '^Default options' | tail -n 2 Honza> Default options are read from the following files in the given order: Honza> /etc/mysql/my.cnf /etc/my.cnf ~/.my.cnf I checked this on my version of MariaDB (fresh from bzr) on OpenSuse: mysqld Ver 5.5.32-MariaDB-debug Default options are read from the following files in the given order: /etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf Honza> I don't understand why /etc/my.cnf is not on the first place in that Honza> output. Can somebody give me a hint? Am I just blind? I did check the mysqld version that comes with OpenSuse 12.3 and this gives: Default options are read from the following files in the given order: /etc/mysql/my.cnf /etc/my.cnf ~/.my.cnf This packet is named: mariadb-5.5.29-1.1.1.x86_64 and built by http://bugs.opensuse.org What is the version name of the libexec/mysqld that you got and who has built it? Can you get the source of the package ? Honza> Just FTR I'm trying that on Fedora 19, but there are no changes in Honza> Fedora packages that would do anything related, so I guess the same Honza> result would be in other distros as well. Honza> [1] https://kb.askmonty.org/en/mysqld-startup-options/ That should be the default order. Don't know why OpenSuse has changed the order or what the Fedora package maintainer has done. Regards, Monty
On 08/13/2013 12:51 PM, Michael Widenius wrote:
Hi!
"Honza" == Honza Horak <hhorak@redhat.com> writes:
Honza> Hi guys, Honza> maybe I just need some little kick or I should get a coffee, but I can't Honza> understand the following config file ordering difference.
Honza> Reading [1] and code in mariadb-5.5.32/mysys/default.c:1226, it looks Honza> like expected order of config files in Linux should be:
Honza> /etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf
Honza> However, when asking for that using --help --verbose, I get a bit Honza> different output:
Honza> $ /usr/libexec/mysqld --help --verbose 2>/dev/null | grep --after=1 Honza> '^Default options' | tail -n 2 Honza> Default options are read from the following files in the given order: Honza> /etc/mysql/my.cnf /etc/my.cnf ~/.my.cnf
I checked this on my version of MariaDB (fresh from bzr) on OpenSuse:
mysqld Ver 5.5.32-MariaDB-debug
Default options are read from the following files in the given order: /etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf
Honza> I don't understand why /etc/my.cnf is not on the first place in that Honza> output. Can somebody give me a hint? Am I just blind?
I did check the mysqld version that comes with OpenSuse 12.3 and this gives:
Default options are read from the following files in the given order: /etc/mysql/my.cnf /etc/my.cnf ~/.my.cnf
This packet is named: mariadb-5.5.29-1.1.1.x86_64 and built by http://bugs.opensuse.org
What is the version name of the libexec/mysqld that you got and who has built it?
Can you get the source of the package ?
Hi Monty, thanks for your explanation so far.. It's happening on all fedora packages I've tested, currently mariadb-5.5.31-4.fc19.src.rpm But when trying to build from downloaded tarball with various options I've found something interesting. When using "-DINSTALL_LAYOUT=RPM" in the cmake call, then the order is /etc/mysql/my.cnf /etc/my.cnf ~/.my.cnf but when *not* using "-DINSTALL_LAYOUT=RPM", then the order is /etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf I haven't found yet why is this happening, haven't spotted any significant #IF macro or anything what could cause this.. Maybe you have an idea? Cheers, Honza
On 08/13/2013 06:20 PM, Honza Horak wrote:
On 08/13/2013 12:51 PM, Michael Widenius wrote:
Hi!
> "Honza" == Honza Horak <hhorak@redhat.com> writes:
Honza> Hi guys, Honza> maybe I just need some little kick or I should get a coffee, but I can't Honza> understand the following config file ordering difference.
Honza> Reading [1] and code in mariadb-5.5.32/mysys/default.c:1226, it looks Honza> like expected order of config files in Linux should be:
Honza> /etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf
Honza> However, when asking for that using --help --verbose, I get a bit Honza> different output:
Honza> $ /usr/libexec/mysqld --help --verbose 2>/dev/null | grep --after=1 Honza> '^Default options' | tail -n 2 Honza> Default options are read from the following files in the given order: Honza> /etc/mysql/my.cnf /etc/my.cnf ~/.my.cnf
I checked this on my version of MariaDB (fresh from bzr) on OpenSuse:
mysqld Ver 5.5.32-MariaDB-debug
Default options are read from the following files in the given order: /etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf
Honza> I don't understand why /etc/my.cnf is not on the first place in that Honza> output. Can somebody give me a hint? Am I just blind?
I did check the mysqld version that comes with OpenSuse 12.3 and this gives:
Default options are read from the following files in the given order: /etc/mysql/my.cnf /etc/my.cnf ~/.my.cnf
This packet is named: mariadb-5.5.29-1.1.1.x86_64 and built by http://bugs.opensuse.org
What is the version name of the libexec/mysqld that you got and who has built it?
Can you get the source of the package ?
Hi Monty,
thanks for your explanation so far..
It's happening on all fedora packages I've tested, currently mariadb-5.5.31-4.fc19.src.rpm
But when trying to build from downloaded tarball with various options I've found something interesting. When using "-DINSTALL_LAYOUT=RPM" in the cmake call, then the order is /etc/mysql/my.cnf /etc/my.cnf ~/.my.cnf but when *not* using "-DINSTALL_LAYOUT=RPM", then the order is /etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf
I haven't found yet why is this happening, haven't spotted any significant #IF macro or anything what could cause this.. Maybe you have an idea?
So I've investigated a bit and found the reason and possible patch. For more info see the bug report: https://mariadb.atlassian.net/browse/MDEV-4927 Cheers, Honza
participants (2)
-
Honza Horak
-
Michael Widenius