MySQL Server 5.5 主从同步报错unknown variable 'master-host=192.168.1.111'问题的解决
\MySQL Server 5.5 主从同步报错unknown variable 'master-host=192.168.1.111'
错误如下:
120401 15:45:44 [ERROR] C:\Program Files\MySQL\MySQL Server 5.5\bin\mysqld: unknown variable 'master-host=192.161.8.111'
120401 15:45:44 [ERROR] Aborting
my配置如下:
[mysqld]
log-error=C:/Program Files/MySQL/MySQL Server 5.5/logerror.log
log=C:/Program Files/MySQL/MySQL Server 5.5/log.log
server-id=2
master-host=192.168.8.111
master-user=backup
master-password=backup
master-port=3306
master-connect-retry=60
回答解决方案:
master-host=192.168.1.111
master-user=backup
master-password=backup
master-port=3306
master-connect-retry=60
这些参数 mysql5.5已经废弃了
必须在slave上用change master to 来设置slave
Mysql版本从5.1.7以后开始就不支持“master-host”类似的参数
在从库上执行如下命令;
change master to master_host='masterIP', master_user='slave', master_password='slvaePASS';
slave start;
切记:
此处是masterIP地址,不是slave地址,而登陆账号为slave账号密码