首页 » 技术分享 » MySQL5.5.28配置master-maser复制,master-host等参数不用了

MySQL5.5.28配置master-maser复制,master-host等参数不用了

 

今天在测试环境中配置两个MySQL的复制,按照以前的方法,修改my.cnf之后启动,报错:

[root@XXXX ~]# /etc/init.d/mysql restart
 ERROR! MySQL server PID file could not be found!
Starting MySQL......................................................................................................... ERROR! The server quit without updating PID file (/var/lib/mysql/XXXX.pid).
[root@XXXX ~]#

查看log,发现下面信息:

130418  6:15:52 [ERROR] /usr/sbin/mysqld: unknown variable 'master-host=x.x.x.x'
130418  6:15:52 [ERROR] Aborting

 

网上查了一下,才发现是MySQL5.5之后有了变化。有些参数不用了。官方文档如下:

Obsolete options. The following options are removed in MySQL 5.5. If you attempt to start mysqld with any of these options in MySQL 5.5, the server aborts with an unknown variable error. To set the replication parameters formerly associated with these options, you must use the CHANGE MASTER TO ... statement (see Section 13.4.2.1, “CHANGE MASTER TO Syntax”).

The options affected are shown in this list:

  • --master-host

  • --master-user

  • --master-password

  • --master-port

  • --master-connect-retry

  • --master-ssl

  • --master-ssl-ca

  • --master-ssl-capath

  • --master-ssl-cert

  • --master-ssl-cipher

  • --master-ssl-key

转载自原文链接, 如需删除请联系管理员。

原文链接:MySQL5.5.28配置master-maser复制,master-host等参数不用了,转载请注明来源!

0