Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to set some defaults in my.cnf and when I tried to check MySQL's current defaults I got an error!

  • Using Zend Server CE 5.5
  • on OSX 10.6.8

And here is the command and subsequent error:

$ mysql --print-defaults
/usr/local/zend/mysql/bin/mysql.client: unknown option '--print-defaults'

When I type --help it shows the --print-defaults as an option.

Am I doing something wrong? Has anyone else experienced this?

(Note: if this question belongs on Super User please let me know and don't downvote it -- unless it actually deserves one.)


I tried doing mysqld --print-defaults and as I reported it didn't work either. So I checked if it was running and this is what I got:

$ ps aux | grep mysqld
 5:36PM  0:00.01 grep mysqld
Mon02AM  2:24.61 /usr/local/zend/mysql/bin/mysqld 
                 --socket=/usr/local/zend/mysql/tmp/mysql.sock --port=3306
share|improve this question

mysql is the client program.

What you want is the server. Run this please

mysqld --print-defaults

I found it by asking the server

mysqld --help --verbose | grep print

and I got this

--print-defaults        Print the program argument list and exit.

A safer method is to use mysqladmin

mysqladmin -uuser -ppassword variables

Give it a Try !!!

share|improve this answer
I tried the first one and got this: $ mysqld --print-defaults (new-line) mysqld would have been started with the following arguments: and an empty argument list – bought777 Dec 16 '11 at 19:39
Make sure mysqld is running when you call mysqld --print-defaults – RolandoMySQLDBA Dec 16 '11 at 21:46
check my edit, mysqld is running and it still doesn't work.. Any ideas? – bought777 Dec 17 '11 at 23:43
Sorry, while this was a good answer, it did not actually work and I still haven't solved this haha. Sorry it took me so long to upvote! – bought777 Nov 15 '12 at 3:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.