Tech4Him – Technology with Integrity

A Christian technology chaos wrangler and his thoughts

Don’t leave your MySQL hanging (check your my.cnf)

Posted by Tom On August - 19 - 2009

2380021517_b526fbfc98_mAdmit 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. :o )

Popularity: 3% [?]

Share and Enjoy:
  • Print
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • email
  • LinkedIn
  • PDF
  • RSS
  • Slashdot
  • StumbleUpon
  • Technorati
  • Twitter

Leave a Reply