In the Apache world, you might be familiar with tweaking your config file(s) and then running
$ apachectl configtest
to see if the config parses. We've been discussing this on the drizzle mailing list and talking in general about configuration handling and management. Well, it turns out that you can fake it in MySQL and Drizzle too.
If you have a new configuration in /tmp/new.cnf, try this:
$ mysqld --defaults-file=/tmp/new.cnf --verbose --help
And it'll run mysqld (or drizzled), parse the config, report any problems, print help, and exit without initializing storage engines or trying to grab a port.
Neat trick!
Thanks to Baron Schwartz, Arjen Lentz, and Sheeri Cabral (book) for helping to demonstrate this.
Posted by jzawodn at April 29, 2009 07:45 AM
When I add a "log_bin_trust_function_creators=1" in the conf to get my triggers to run in 5.1.34, the above option craps out and gives me the following error - 090506 17:13:35 [ERROR] mysqld: unknown variable 'log_bin_trust_function_creators=1'. However when I start the MySQL server and do a show variables it shows that the triggers are enabled.
So I was wondering whether the above is really a reliable way to test the configuration file. It didn't work for me.