一、查看日志应用状态
mysql> show processlist; +----+------+---------------+-------+-------------+------+-----------------------------------------------------------------------+------------------+-----------+---------------+ | Id | User | Host | db | Command | Time | State | Info | Rows_sent | Rows_examined | +----+------+---------------+-------+-------------+------+-----------------------------------------------------------------------+------------------+-----------+---------------+ | 5 | root | localhost | ifree | Sleep | 2250 | | NULL | 0 | 0 | | 17 | rep | testdb2:41690 | NULL | Binlog Dump | 2400 | Master has sent all binlog to slave; waiting for binlog to be updated | NULL | 0 | 0 | | 19 | root | localhost | NULL | Query | 0 | init | show processlist | 0 | 0 | +----+------+---------------+-------+-------------+------+-----------------------------------------------------------------------+------------------+-----------+---------------+ 3 rows in set (0.00 sec)
(其实我也没看懂。。。)
二、修改/etc/my.cnf(参考master配置,此处祭出师父blog,略)
http://debugo.com/mysql-5-6-master-slave/
三、停slave,关掉只读
1.停slave
mysql> stop slave; Query OK, 0 rows affected, 1 warning (0.00 sec)
2.关只读
mysql> set global read_only=0; Query OK, 0 rows affected (0.00 sec)
3.重置slave
mysql> reset slave; Query OK, 0 rows affected (0.01 sec)
四、如果未生效则重启下mysql进程试试
参考:http://blog.itpub.net/758322/viewspace-714346