Bug #23881 Add a server variable that tells which config file the server is actually using
Submitted: 2 Nov 2006 10:04 Modified: 5 Feb 2008 13:19
Reporter: Mike Lischke Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: General Severity:S4 (Feature request)
Version: OS:Any (any)
Assigned to: CPU Architecture:Any
Tags: config file, server variables

[2 Nov 2006 10:04] Mike Lischke
Description:
It would be extremely helpful if the server would tell us which config file it is currently using. Not only would bug hunting be simpler if something with the config file is wrong it would also help management tools which allow comfortable edition of config variables.

How to repeat:
Hmm, I marked it as feature request and *must* supply a way to reproduce a bug? Could be improved as well.

Suggested fix:
I bet somewhere in the server is stored which config file is currently being used since the server had to open it. Just add a (read-only) variable that can be queried.
[2 Nov 2006 10:09] Mike Lischke
Important too: which section in the config file is used by the server. This is important because several servers can share the same config file either using the same section or different ones.
[3 Nov 2006 16:38] Sergei Golubchik
The feature would be more useful if you'd ask about something that affect a running server.
But if you change a config file you'll need to restart the server for changes to take any effect. And if you're starting the server's binary you can as well give --help command-line option and see

...
Default options are read from the following files in the given order:
/etc/my.cnf /var/mysql/my.cnf ~/.my.cnf 
The following groups are read: mysqld server mysqld-4.1
...
[5 Feb 2008 13:19] Mike Lischke
Part of a larger (related) list now.