我想在我的机器上尝试
MySQL 5.6,但我无法启动它.我总是得到一个错误:
[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
我试着在my.cnf中设置log和log-bin参数,也作为mysqld的启动参数,但没有运气.知道我能做什么吗?
我的环境
OS X 10.6.8
mysql-5.6.5-m8-osx10.6-x86 (not _x64 version)
注意:我也在这台机器上运行MySQL 5.5(不同的端口和套接字).我也尝试停止这个实例但是我得到了一些错误.
更新:
谢谢你的帮助,但我仍然遇到了一些错误.我现在已将my.cnf更改为:
[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
我用脚本启动MySQL:
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
但我仍然得到同样的错误:
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
这很奇怪,因为我没有在任何地方设置–log = / var / log / mysqld.log.