Admit it! Have you ever made a change to your my.cnf file, restarted mysqld only to have the restart fail because of an error in the configuration file? Come on, you don’t have to hide anything here.
Well, I found my new best friend when performance tuning mysql. Thanks to this simple post, we can now check the syntax of out “tweaked” my.cnf file BEFORE restarting mysqld.
Yup. All your mysql experts are saying, “Duh!”. Well, for me this was well worth the 15 seconds to find with Google.
Use the mysqld shell command with the –help and –verbose flags. If there is an error in your my.cnf file, it will tell you as in the example below. For those who don’t want to learn more, if your my.cnf is syntactically correct, you will get the long config settings list displayed.
# /usr/libexec/mysqld --help --verbose 081009 9:55:36 [ERROR] /usr/libexec/mysqld: unknown variable 'mmax_connections=150'
Once your done, you can quickly restart mysqld. Hopefully, nobody even notices.
)
Popularity: 3% [?]