【发布时间】:2017-06-01 03:35:31
【问题描述】:
我在尝试访问 mysql 时遇到以下错误:
mysql: [错误] 在配置文件 /etc/mysql/my.cnf 的第 22 行找到没有前面组的选项! mysql:[错误]默认处理中的致命错误。程序中止!
/etc/mysql/my.cnf
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
#
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
#
!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/
bind-address = 127.0.0.1
general_log_file = /var/log/mysql/mysql.log
general_log = 1
任何帮助将不胜感激。
【问题讨论】:
-
第 22 行是您的绑定地址。问题——因为我也有——他们在说什么前一组?
-
当我错误地替换了 #The MySQL 数据库服务器配置文件时,我遇到了同样的问题。与前面不带 # 的一些字符对齐。
标签: mysql