CentOS 6.4 上的 MySQL 5.1.69 不知道启用命名管道吗?

CentOS 6.4 上的 MySQL 5.1.69 不知道启用命名管道吗?

尝试在 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

我已经在 Google 上搜索过 /usr/share/mysql/*.cnf该指令,但没有找到任何提示。

答案1

没有提示?

[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:

--enable-named-pipe
Command-Line Format --enable-named-pipe
Option-File Format  enable-named-pipe
Platform Specific   windows  <--------------------

启用对命名管道的支持。该选项只能与支持命名管道连接的 mysqld-nt 和 mysqld-debug 服务器一起使用。

从您的设置中删除该设置/etc/my.cnf并重新启动该过程。

相关内容