MySQL> show master status;
+------------------+-----------+--------------+------------------+-------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+------------------+-----------+--------------+------------------+-------------------+
| mysql-bin.000003 | 290903331 | | | |
+------------------+-----------+--------------+------------------+-------------------+
1 row in set (0.00 sec)
mysql> reset master;
Query OK, 0 rows affected (0.28 sec)
mysql> show slave status\G;
*************************** 1. row ***************************
Slave_IO_State: Reconnecting after a failed master event read
Master_Host: xxx.xxx.xxx.xxx
Master_User: slavexxx
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000004
Read_Master_Log_Pos: 18841739
Relay_Log_File: local-relay-bin.000022
Relay_Log_Pos: 4799132
Relay_Master_Log_File: mysql-bin.000004
Slave_IO_Running: Connecting
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 18841739
Relay_Log_Space: 5297368
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 2003
Last_IO_Error: error reconnecting to master 'slavexxx@xxx.xxx.xxx.xxx:3306' - retry-time: 60 retries: 938
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 1
Master_UUID: fa8d6da3-a285-11e2-a150-00265518b2bb
Master_Info_File: /mysqldata/master.info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State: Slave has read all relay log; waiting for the slave I/O thread to update it
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp: 131024 09:31:40
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set:
Executed_Gtid_Set:
Auto_Position: 0
1 row in set (0.00 sec)
ERROR:
No query specified
mysql> stop slave;
Query OK, 0 rows affected (0.06 sec)
mysql> reset slave;
Query OK, 0 rows affected (0.11 sec)
mysql> show slave status\G;
*************************** 1. row ***************************
Slave_IO_State:
Master_Host: xxx.xxx.xxx.xxx
Master_User: slavexxx
Master_Port: 3306
Connect_Retry: 60
Master_Log_File:
Read_Master_Log_Pos: 4
Relay_Log_File: local-relay-bin.000001
Relay_Log_Pos: 4
Relay_Master_Log_File:
Slave_IO_Running: No
Slave_SQL_Running: No
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 0
Relay_Log_Space: 143
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 1
Master_UUID: fa8d6da3-a285-11e2-a150-00265518b2bb
Master_Info_File: /mysqldata/master.info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State:
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set:
Executed_Gtid_Set:
Auto_Position: 0
1 row in set (0.00 sec)
ERROR:
No query specified

一些同步的信息还在,其实执行reset slave,其实是把master.info和relay-log.info文件给删除,但里面的同步信息还在,那么可以用这个方法,让其清除的彻彻底底。

[root@localhost mysqldata]# ls
auto.cnf dxmonitor dxstatistics ibdata1 ib_logfile1 localhost.err master.info mysql-bin.000001 mysqld_safe.pid relay-log.info test
discoverworkflow dxstatbak faxian.err ib_logfile0 ibtmp1 localhost.pid mysql mysql-bin.index performance_schema similarityanalysis zeus
[root@localhost mysqldata]# ls
auto.cnf dxmonitor dxstatistics ibdata1 ib_logfile1 localhost.err mysql mysql-bin.index performance_schema test
discoverworkflow dxstatbak faxian.err
mysql> reset slave all;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 1227
Current database: *** NONE ***
Query OK, 0 rows affected (0.00 sec)
mysql> show slave status\G;
Empty set (0.00 sec)
ERROR:
No query specified
mysql>

如何干净的清除Slave同步信息的更多相关文章

  1. RESET MASTER和RESET SLAVE使用场景和说明,以及清除主从同步关系

    mysql主从复制中,需要将从库提升为主库,需要取消其从库角色,这可通过执行RESET SLAVE ALL清除从库的同步复制信息.包括连接信息和二进制文件名.位置.从库上执行这个命令后,使用show ...

  2. 10gR2-11gR1,11gR2如何干净的清除并重建OCR和表决磁盘

    下面分别讨论10gR2-11gR1和11gR2干净的清除并重建OCR和表决磁盘的方法. 一.10gR2-11gR1干净的清除并重建OCR和表决磁盘的方法 参考METALINK文章:ID 399482. ...

  3. Spring Security怎样不让默认的ProviderManager清除密码等信息

    <authentication-manager erase-credentials="false"> ... </authentication-manager&g ...

  4. 清除windows激活信息

    1.管理员运行命令提示符 在命令提示符中输入 slmgr /upk---删除当前KMS密匙 出现"成功地卸载了产品密匙"后,继续依次执行下面两个命令 slmgr /ckms---此 ...

  5. 11.16-18 lsci、ipcs、ipcrm:清除ipc相关信息

    lspci:显示所有PCI设备 lspci命令用来显示系统中的所有PCI总线设备或是连接到该总线上的所有设备. lspci命令的参数选项及说明 -v     显示详细信息 -vv    显示更详细的信 ...

  6. MySQL 清除从库同步信息

    实际的业务生产系统中,mysql从库有时候会根据实际需求变更为主库,这时候我们需要清除掉从库配置的主从信息登录从库执行以下命令:mysql> stop slave;mysql> reset ...

  7. mysql5.7主从(Master/Slave)同步配置

    环境: mysql版本都是5.7(以前的版本配置可能不一样) 主(Master) windows:192.168.0.68 从(Slave) centos7:192.168.0.4 基本环境配置: 要 ...

  8. 如何查看和清除svn登录信息

    切换svn登录用 点击clear,出现用户信息,勾选后点击ok 即清除 .下次访问svn需要重新登录

  9. mysql的master和slave同步方案

    同步原理 master将改变记录到二进制日志(binary log)中 slave将master的binary log events拷贝到它的中继日志(relay log) slave重做中继日志中的 ...

随机推荐

  1. vue 登录验证引擎

    1.router配置: 路由元信息 const router = new VueRouter({ routes: [ { path: '/foo', component: Foo, children: ...

  2. arcgis-tomcat-cors

    C:\Program Files\ArcGIS\Server\framework\runtime\tomcat\webapps\arcgis#rest\WEB-INF\ (1)添加cors-filte ...

  3. ubuntu git生成ssh key (公钥私钥)配置github或者码云

    Git是分布式的代码管理工具,远程的代码管理是基于SSH的,所以要使用远程的Git则需要SSH的配置. github的SSH配置如下: 设置Git的user name和email: git confi ...

  4. bind() 函数兼容

    为了搞清这个陌生又熟悉的bind,google一下,发现javascript1.8.5版本中原生实现了此方法,目前IE9+,ff4+,chrome7+支持此方法,opera和safari不支持(MDN ...

  5. CTF之栅栏密码

    栅栏密码是比较常见的加密方式之一,其原理是将一组明文分成N组,将每一组的第一个明文取出按照顺序组成一串密文,并将这段密文附在第一段密文之后,以此类推 例如: 分了两组,即秘钥为2: 明文:THERE ...

  6. 实习第一周第一天:接口 extends是继承类,implement是实现接口,原接口里面的方法填充,方法名也是不变,重写override是父类的方法名不变,把方法体给改了

    一.定义 Java接口(Interface),是一系列方法的声明,是一些方法特征的集合,一个接口只有方法的特征没有方法的实现,因此这些方法可以在不同的地方被不同的类实现,而这些实现可以具有不同的行为( ...

  7. StreamSets SDC RPC Pipelines说明

    主要目的是进行跨pipeline 数据的通信,而不仅仅是内部pipeline 的通信,之间不同网络进行通信 一个参考图 pipeline 类型 origin destination 部署架构 使用多个 ...

  8. 【转】解决Win7字体模糊不清晰的最佳办法

    原文网址:http://blog.sina.com.cn/s/blog_3d5f68cd0100ldtp.html 相信初次用win7的朋友,都会遇到字体不清晰的问题,有很多人因为这个问题而放弃使用w ...

  9. jquery禁止复制、禁用右键、文本选择功能、复制按键

    本文章介绍的jquery禁用右键.文本选择功能.复制按键的实现它可以兼容浏览器有IE.firefox.谷歌浏览器,各位朋友可参考.IE浏览器是指以IE为核心的浏览器也支持,有360,QQ等 代码如下: ...

  10. MapReduce-寻找三角形

    在图中,如何判断三角形?三角形在很多场景都有应用,比如社交网络中确定人和人之间的关系. 那么如果通过代码逻辑来实现呢?在数据结构之图中,区分三联体(有一端没有关联关系的三角形)和三角形是关键:两者之间 ...