MySQL Error on Startup: ambiguous option ‘–log=/var/log/thesqld.log’

loggingmac-osxMySQL

I would like to try MySQL 5.6 on my machine, but I cannot start it. I always get an error :

[ERROR] /usr/local/mysql-5.6.5-m8-osx10.6-x86/bin/mysqld: ambiguous option '–log=/var/log/mysqld.log' (log-bin, log_slave_updates)

my.cnf

[mysqld]
pid-file=/usr/local/mysql-5.6.5-m8-osx10.6-x86/mysql.pid
log-error=/usr/local/mysql-5.6.5-m8-osx10.6-x86/data/mysql-error.log
log-slow-queries=/usr/local/mysql-5.6.5-m8-osx10.6-x86/data/mysql-slowquery.log
log-bin=/usr/local/mysql-5.6.5-m8-osx10.6-x86/data/mysql-bin.log
general_log_file=/usr/local/mysql-5.6.5-m8-osx10.6-x86/data/mysql-general_log_file.log
log=/usr/local/mysql-5.6.5-m8-osx10.6-x86/data/mysql.log

I tried to set the log and log-bin parameters in my.cnf and also as start parameters for mysqld, but with no luck. Any idea what I can do?

My environment

OS X 10.6.8
mysql-5.6.5-m8-osx10.6-x86 (not _x64 version)

Note: I'm also running MySQL 5.5 on this machine (different port and socket). I also try to stop this instance but I get the some error.

Update:
Thank you for help but I'm still gettings the some error. I have now changed my.cnf to:

[mysqld]
user        = myusername
port        = 3307
socket      = /tmp/mysql_56.sock
skip-external-locking
key_buffer_size = 256M
group_concat_max_len = 50240
max_allowed_packet = 16777216
table_open_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size= 16M
thread_concurrency = 8
datadir=/usr/local/mysql-5.6.5-m8-osx10.6-x86/data
pid-file=/usr/local/mysql-5.6.5-m8-osx10.6-x86/mysql.pid
log-error=/usr/local/mysql-5.6.5-m8-osx10.6-x86/data/mysql-error.log
log-slow-queries=/usr/local/mysql-5.6.5-m8-osx10.6-x86/data/mysql-slowquery.log
log-bin=/usr/local/mysql-5.6.5-m8-osx10.6-x86/data/mysql-bin.log
general-log=1
general_log_file=/usr/local/mysql-5.6.5-m8-osx10.6-x86/data/mysql-general_log_file.log

And I start MySQL with a script:

cd /usr/local/mysql-5.6.5-m8-osx10.6-x86
./bin/mysqld_safe --basedir=/usr/local/mysql-5.6.5-m8-osx10.6-x86
cd $HOME

But I'm still getting the same error:

120611 16:02:02 mysqld_safe Starting mysqld daemon with databases from
/usr/local/mysql-5.6.5-m8-osx10.6-x86/data

120611 16:02:02 [ERROR] /usr/local/mysql-5.6.5-m8-osx10.6-x86/bin/mysqld: ambiguous option '–log=/var/log/mysqld.log' (log-bin, log_slave_updates)

120611 16:02:02 [ERROR] Aborting

120611 16:02:02 [Note] Binlog end

120611 16:02:02 mysqld_safe mysqld from pid file /usr/local/mysql-5.6.5-m8-osx10.6-x86/mysql.pid ended

This is very strange because I did not set --log=/var/log/mysqld.log anywhere.

Best Answer

Make sure your start.sh is using the correct my.cnf with --defaults-file=/path/to/my.cnf

You may also have another my.cnf automatically being included (usually /etc/mysql/my.cnf) that could be adding/overriding options in your base config file.