Bug #20764 Have mysql.server script pass $datadir/my.cnf via --defaults-extra-file
Submitted: 29 Jun 2006 3:07 Modified: 5 Dec 2007 18:55
Reporter: Lachlan Mulcahy Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: Options Severity:S4 (Feature request)
Version:5.5 OS:Any
Assigned to: CPU Architecture:Any

[29 Jun 2006 3:07] Lachlan Mulcahy
Currently MySQL will only look for a my.cnf file in the default datadir as set at *compile time*. 

If the user is using their own setting for datadir, this becomes fairly useless.

How to repeat:

Suggested fix:
The mysql.server init script could pass the user's datadir my.cnf via --defaults-extra-file if the file exists:

$bindir/mysqld_safe --defaults-extra-file=$datadir/my.cnf --datadir=$datadir --pid-file=$pid_file >/dev/null 2>&1 &

This would make a my.cnf in the datadir more "relevant" to your installation setup.
[29 Jun 2006 13:14] Valeriy Kravchuk
Thank you for a reasonable feature request.