时间:2021-07-01 10:21:17 帮助过:14人阅读
3 测试:
在原从上添加数据:
mysql> use students; mysql> select * from users; +----+------+ | id | name | +----+------+ | 1 | a | | 2 | b | | 3 | c | +----+------+ mysql> use students; mysql> insert into users values (7,"g"); mysql> select * from users; +----+------+ | id | name | +----+------+ | 1 | a | | 2 | b | | 3 | c | | 7 | g | +----+------+
看原主
mysql> select * from users; +----+------+ | id | name | +----+------+ | 1 | a | | 2 | b | | 3 | c | | 7 | g | +----+------+
到此就实现了主主。
注意:
在mysql5.6之后不用指定以下,不然会出现报错:
master-host=192.168.1.1 #Master的主机IP master-user=root master-password=mysql password #Master的MySQL密码 Shutting down MySQL... SUCCESS! Starting MySQL... ERROR! The server quit without updating PID file (/data/mysqldb/xxx.pid)
本文出自 “给自己充电” 博客,请务必保留此出处http://zengzeyang.blog.51cto.com/6129531/1911173
mysql 5.6.33主从+主主
标签:mysql 主从 主主