"Crawling out of the pit" MySQL slave to master

Source: Internet
Author: User

First, view the log app status

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 &nbsP;| 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)

(In fact, I do not understand ...) )

Second, modify the/ETC/MY.CNF (refer to master configuration, here Apprenticeship Father Blog, slightly)

http://debugo.com/mysql-5-6-master-slave/

Three, stop slave, turn off read-only

1. Stop slave

mysql> stop Slave; Query OK, 0 rows affected, 1 Warning (0.00 sec)

2. Off-Read Only

mysql> set global read_only=0; Query OK, 0 rows Affected (0.00 sec)

3. Reset Slave

mysql> Reset Slave; Query OK, 0 rows affected (0.01 sec)

Iv. Restart the MySQL process if it is not in effect try


Reference: http://blog.itpub.net/758322/viewspace-714346



Crawl out of the pit MySQL slave to master

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.