← Back to team overview

maria-discuss team mailing list archive

Re: Upgrade from 10.0.12 -> 10.0.13 changes default config file location behavior; build-time "-DDEFAULT_SYSCONFDIR=" is now ignored ?

 

Hi serg

On Tue, Aug 12, 2014, at 07:45 AM, Sergei Golubchik wrote:
> Hi, grantksupport!
> I don't see how this could've been possible. The code doesn't search in
> the @CMAKE_INSTALL_PREFIX@/etc, and I've just built MariaDB 10.0.12, and
> tools aren't reading /usr/local/mariadb/etc/my.cnf file:
> 
> $ mysqldump --help
> ...
> Default options are read from the following files in the given order:
> /etc/my.cnf /etc/mysql/my.cnf /usr/local/etc/mariadb.DEFAULT/my.cnf ~/.my.cnf 
> ...
> 
> And 10.0.13 didn't change that.

here, with *my* 10.0.13,

$ mysqldump --help
...
Default options are read from the following files in the given order:
/usr/local/etc/mariadb.DEFAULT/my.cnf ~/.my.cnf 
...

You can see from the included ^^^ strace that those are the ONLY two locations checked -- DESPITE having specified all of

		-DINSTALL_SYSCONFDIR=/usr/local/etc/mariadb.DEFAULT \
		-DINSTALL_SYSCONF2DIR=/usr/local/etc/mariadb.DEFAULT/conf.d \
		-DDEFAULT_SYSCONFDIR=/usr/local/etc/mariadb \

> Perhaps you've symlinked  /usr/local/mariadb/etc/my.cnf to /etc/my.cnf?
> Because this was changed in 10.0.13, indeed.
> 
> Before 10.0.13 MariaDB was reading /etc/my.cnf and /etc/mysql/my.cnf
> unconditionally. Since 10.0.13 it does that only if you didn't specify
> INSTALL_SYSCONFDIR or DEFAULT_SYSCONFDIR. If you've explicitly specified
> where your config files are, MariaDB won't look elsewhere, you can
> "sandbox" it in a dedicated location and know that it won't look outside
> of it.

So "stuff" *has* changed ...

Here, having "explicitly specified where your config files are", it's not that MariaDB x.13 "won't look elsewhere", the issue is that it won't look THERE.

"sandbox"-ing *is* what I'm looking for.  I.e., I want MariaDB & all client apps to look ONLY in 

  -DDEFAULT_SYSCONFDIR=/usr/local/etc/mariadb

What do I need to change to make that happen?

Grant



Follow ups

References