mysql主从复制或其他操作报错ERROR 1064 (42000): You have an er

实验环境介绍:

在进行mysql主从复制配置从服务器时,系统报错

mysql> change master to master_host='192.168.109.149',master_user='myslave'.master_password='123123',master_log_file='mysql-.bin.000005'master_log_pos=477;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.master_password='123123',master_log_file='mysql-bin.000005'master_log_pos=477' at line 1
mysql>

检查我的操作命令没有检查出问题,于是进行百度,看看万能的网友们,有没有遇到同样的问题,及他们的解决方法,

blob.png


以下是,搜索到的几条收到同样报错信息的不同错误集合

1、

blob.png

2、

blob.png

3、

blob.png

4、

blob.png


看了以上报错后,我....知道了,肯定是我的配置命令有问题!我没有检查出来

blob.png


于是,我又去检查配置命令,发现少了一个逗号分隔

blob.png

最最最终确定配置命令无误后再次执行

blob.png

是的,他成功了!!



总结,当遇到

RROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.master_password='123123',master_log_file='mysql-bin.000005'master_log_pos=477' at line 1

此报错,一定要检查10000遍你的配置命令。


然后,你的问题就解决了。


好了朋友们,我们下期再见。

猜你喜欢

转载自blog.51cto.com/14475876/2453093