在从库进行锁表操作flush table with read lock,

通过show slave status\G 获取对应主库的位置点:

show slave status\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 100.119.16.72
Master_User: root
Master_Port: 20160
Connect_Retry: 60
Master_Log_File: mysql-bin.000005
Read_Master_Log_Pos: 274264328
Relay_Log_File: relay-bin.000070
Relay_Log_Pos: 14356867
Relay_Master_Log_File: mysql-bin.000005
Slave_IO_Running: Yes
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: 274264328
Relay_Log_Space: 24804608
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: 0
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: 113235
Master_UUID: b6c2a4cb-8973-11e7-8042-6c92bf482dbf
Master_Info_File: /data1/mysql_root/data/20160/master.info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set: 6c1f2f1d-8875-11e7-b55d-18ded7a37fee:4103537-4109582,
b6c2a4cb-8973-11e7-8042-6c92bf482dbf:1-13481914
Executed_Gtid_Set: 6c1f2f1d-8875-11e7-b55d-18ded7a37fee:4103537-4109582,
b6c2a4cb-8973-11e7-8042-6c92bf482dbf:1-13481914,
bf3d5f44-8973-11e7-aaa2-6c92bf482c5f:1-135
Auto_Position: 1
Replicate_Rewrite_DB:
Channel_Name:
Master_TLS_Version:
1 row in set (0.00 sec)

在从库执行show master status获取从库备份时的位置点:

show master status;
+------------------+----------+--------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+------------------+----------+--------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
| mysql-bin.000061 | 14461503 | | | 6c1f2f1d-8875-11e7-b55d-18ded7a37fee:4103537-4109582,
b6c2a4cb-8973-11e7-8042-6c92bf482dbf:1-13482456,
bf3d5f44-8973-11e7-aaa2-6c92bf482c5f:1-135 |
+------------------+----------+--------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

mysq在某一刻同时获取主从库的位置点的更多相关文章

  1. soapUI使用-DataSource获取oracle库中的参数

    soapUI使用-DataSource获取oracle库中的参数 下载mysql和oracle驱动包:http://pan.baidu.com/s/1i3sy1MH 放在Program Files\S ...

  2. Mysql主从库同步错误:1062 Error 'Duplicate entry '1438019'

    mysql主从库同步错误:1062 Error 'Duplicate entry '1438019' for key 'PRIMARY'' on query mysql主从库在同步时会发生1062 L ...

  3. MS Sql Server 中主从库的配置和使用介绍(转)

    网站规模到了一定程度之后,该分的也分了,该优化的也做了优化,但是还是不能满足业务上对性能的要求:这时候我们可以考虑使用主从库. 主从库是两台服务器上的两个数据库,主库以最快的速度做增删改操作+最新数据 ...

  4. CentOS 6.4 系统下的MySQL的主从库配置

    首先了解到一. 二一.(MySQL下创建用户并且赋予权限)root用户创建yong用户的SQL语句 CREATE USER 'yong'@'localhost' IDENTIFIED BY 'yong ...

  5. 项目中通过Sorlj获取索引库中的数据

    在开发项目中通过使用Solr所提供的Solrj(java客户端)获取索引库中的数据,这才是真正对项目起实质性作用的功能,提升平台的检索性能及检索结果的精确性 第一步,引入相关依赖的jar包 第二步,根 ...

  6. 【MYSQL】主从库查看及搭建

    show slave status 查看从库信息  http://blog.csdn.net/lxpbs8851/article/details/7898716 搭建主从库   http://www. ...

  7. MYSQL主从库同步配置过程

    MYSQL主从库同步配置过程 为了实现网站数据库的异地备份,采用了MySQL数据库主从同步配置,需要两台服务器分别作为主从库,当主库发生增删改等操作,会实时反映到从库,我的个人服务器配置如下: 主库为 ...

  8. mysql 主从库同步

    #主库修改my.ini [mysqld] server log-bin=mysql-bin binlog-do-db=demo #从库修改my.ini [mysqld] server replicat ...

  9. 定时获取MySQL库的大小

    定时获取MySQL库的大小 获取数据库单个库的大小命令 [root@admin ~]# cat db_size.txt mysql -h 192.8.1.1 -uUSER -pPASSWORD -e' ...

随机推荐

  1. [转]python数据持久存储:pickle模块的基本使用

    python的pickle模块实现了基本的数据序列和反序列化.通过pickle模块的序列化操作我们能够将程序中运行的对象信息保存到文件中去,永久存储:通过pickle模块的反序列化操作,我们能够从文件 ...

  2. Hadoop 读取文件API报错

    Exception in thread "main" org.apache.hadoop.hdfs.BlockMissingException: Could not obtain ...

  3. 在Windows系统上怎么使用SecureCRT链接Linux AWS EC2 -摘自网络

    在Windows系统上就需要使用SecureCRT,Putty等工具,进行连接.但是AWS提供的XXX.pem文件,需要做一些处理SecureCRT的方法: 1.使用XXX.pem文件生成一个公钥文件 ...

  4. css冻结列的效果

    <!DOCTYPE html><html lang="zh-cn"><head><meta charset="utf-8&quo ...

  5. [svc][dhcp]关于无线ap自动发现选项dhcp option43配置

    有人问到option43的问题,查了点资料.总结了下win和linux的option43的配置: windows2003 http://www.h3c.com.cn/Service/Channel_S ...

  6. 修改PS1变量

    PS1='\[\e[7;46m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\]:\[\e[0;34m\]\w\[\e[0m\]\$ ' from: http://profes ...

  7. WebClient请求帮助类

    /// <summary> /// 通过JSON方式发送POST请求 /// 将返回结果按JSON方式解析 /// </summary> public static class ...

  8. html5+css3 权威指南阅读笔记(三)---表单及其它新增和改良元素

    一.新增元素及属性 1.表单内元素的form属性. html5: <form id="testForm"> <input type=text> </f ...

  9. 我的IT之路2013(二)

    严寒即将过去,温暖的春天正在向我们招手,欢呼吧,在迎接新的开始的同时,不要忘了回顾一下过去的这一年,总结一下过去的这一年有什么得失. 英语学习 13年下半年,最大的变化就是有很大一部分时间用来学英语. ...

  10. mysql创建唯一索引

    查看索引  show index from 数据库表名 alter table 数据库add index 索引名称(数据库字段名称) PRIMARY KEY(主键索引) ALTER TABLE `ta ...