所以我现在已经尝试了2-3个小时来修复安装mysql时的几个问题。 现在,我现在仍然坚持这个:
输入时:mysql.server restart
这打印在终端:
my_print_defaults: [ERROR] Found option without preceding group in config file /etc/my.cnf at line 1!
my_print_defaults: [ERROR] Fatal error in defaults handling. Program aborted!
my_print_defaults: [ERROR] Found option without preceding group in config file /etc/my.cnf at line 1!
my_print_defaults: [ERROR] Fatal error in defaults handling. Program aborted!
ERROR! MySQL server PID file could not be found!
my_print_defaults: [ERROR] Found option without preceding group in config file /etc/my.cnf at line 1!
my_print_defaults: [ERROR] Fatal error in defaults handling. Program aborted!
Starting MySQL
. ERROR! The server quit without updating PID file (/usr/local/var/mysql/MacBook.local.pid).
我的my.cnf
文件包含以下内容:(位于~/etc
)
[mysqld_safe]
[mysqld]
[client]
port = 3306
skip-external-locking
bind-address = 127.0.0.1
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
myisam-recover = BACKUP
query_cache_limit = 1M
query_cache_size = 16M
log_error = /var/log/mysql/error.log
expire_logs_days = 10
max_binlog_size = 100M
query-cache-type = 1
default-storage-engine=innodb
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
[isamchk]
key_buffer = 16M
非常感谢任何帮助。
答案 0 :(得分:0)
粘贴my.cfn
中的代码并使用sublime text 2来保存它就行了......