So I've set up my initial master-slave replication pair on two different MySQL servers. That part is working great. So all I have to do is set up the first master as a slave and set up the first slave as the second master, right?
Wrong!
This is what happens when I try to create the second slave account on the secondary master server:
mysql> grant replication slave on *.* to 'repslave2'@'ourhost' identified by 'password';
Query OK, 0 rows affected (0.00 sec)
mysql> start master;
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' at line 1
What? What do you mean, "syntax error"? This is pretty simple stuff. I spelled "master" right. It worked on the other server without having to install anything special. "stop slave" and "start slave" work as advertised on this server. Why won't it work?
EDITED TO ADD:
I think I've found part of the problem - that the master-slave replication is confused between the two servers. Here, I've tried to stop the master on the primary master:
mysql> stop master;
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' at line 1
mysql> stop slave;
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> stop master;
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' at line 1
mysql> start master;
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' at line 1
mysql> start slave;
ERROR 1200 (HY000): The server is not configured as slave; fix in config file or with CHANGE MASTER TO