尝试在 CentOS 6.4 /64 位服务器上安装 MySQL(用于 WordPress)。
我已经安装了mysql-server-5.1.69-1.el6_4.x86_64
软件包并执行了以下命令:
# chkconfig mysqld on
# service mysqld start
# /usr/bin/mysqladmin -u root password 'xxxxx'
# /usr/bin/mysql_secure_installation
然后我注意到该mysqld_safe
进程正在监听 0.0.0.0 并决定更改它 - 以便我的 WordPress 安装仅使用域套接字(或 unix 管道?不确定正确的术语)。
所以我修改/etc/my.cnf
为:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
bind-address = localhost
skip-networking
enable-named-pipe
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
但是现在 MySQL 拒绝启动:
# service mysqld restart
Stopping mysqld: [ OK ]
MySQL Daemon failed to start.
Starting mysqld: [FAILED]
/var/log/mysqld.log
包含:
mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
InnoDB: Initializing buffer pool, size = 8.0M
InnoDB: Completed initialization of buffer pool
InnoDB: Started; log sequence number 0 44233
[ERROR] /usr/libexec/mysqld: unknown option '--enable-named-pipe'
[ERROR] Aborting
InnoDB: Starting shutdown...
InnoDB: Shutdown completed; log sequence number 0 44233
[Note] /usr/libexec/mysqld: Shutdown complete
mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
我搜索了谷歌并搜索
/usr/share/mysql/*.cnf
了该指令,但没有找到任何提示。
没有提示?
根据该版本 MySQL 的在线文档:
从您的设置中删除该设置
/etc/my.cnf
并重新启动该过程。