Why is my Slave not starting on MYSQL?
mysql> start slave;
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> show warnings;
+-------+------+--------------------------+
| Level | Code | Message |
+-------+------+--------------------------+
| Note | 1254 | Slave is already running |
+-------+------+--------------------------+
1 row in set (0.00 sec)
mysql> show slave status\G;
Empty set (0.00 sec)
ERROR:
No query specified
Why???? I did a fresh install of MYSQL. I edited My.cnf. And I restarted the damn things.
This is my slave MY.CNF
server-id = 2
log_bin = /var/log/mysql/mysql-bin.log
master-host = 68.13.41.41
master-user = replication
master-password = slave
master-port = 3306
This is my master MY.cnf:
server-id = 1
log_bin = /var/log/mysql/mysql-bin.log
binlog-do-db=fal
I did this on master:
开发者_运维百科GRANT ALL ON *.* TO 'replication'@'theip' IDENTIFIED BY 'slave';
I fixed it by running commands in the MYSQL thing (instead of relying on the config)
Try adding this line to your MY.CNF on the SLAVE server:
report-host = 68.13.41.41
Then restart MySQL on the SLAVE server.
Now test on the MASTER server:
SHOW SLAVE STATUS \G
I'm guessing you are adding a semi-colon (;) to the end of the statement. Its unnecessary with the \G.
So change show slave status \G;
to show slave status \G
精彩评论