4

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.

migrated from stackoverflow.com Jun 10 '12 at 10:14

This question came from our site for professional and enthusiast programmers.

  • 2
    I think this question may be better suited to Server Fault. – eggyal Jun 10 '12 at 8:07
  • If you can format questions a little when asking on SE sites, that'd be much appreciated - use the 'code' button in the editor, rather than <br/> tags :-). – halfer Jun 10 '12 at 9:56
1

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.

  • Hi! Yes, this was my problem - another my.cnf in /etc/my.cnf. I remove this file and now it starts. Thank you. – MaticPetek Jun 11 '12 at 18:07
10

The "ambiguous option" error message should have pointed you in the right direction... The --log option has been long deprecated, use the --general-log option instead

Please post your other errors messages so that we can help you with them.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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