无法启动 mysql 服务器。配置中组前面的错误

unable to start mysql server. Error preceding group in config

所以我已经尝试了 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

非常感谢任何帮助。

粘贴 my.cfn 中的代码并使用 sublime text 2 保存它成功了...