mysq在某一刻同时获取主从库的位置点
在从库进行锁表操作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在某一刻同时获取主从库的位置点的更多相关文章
- soapUI使用-DataSource获取oracle库中的参数
soapUI使用-DataSource获取oracle库中的参数 下载mysql和oracle驱动包:http://pan.baidu.com/s/1i3sy1MH 放在Program Files\S ...
- Mysql主从库同步错误:1062 Error 'Duplicate entry '1438019'
mysql主从库同步错误:1062 Error 'Duplicate entry '1438019' for key 'PRIMARY'' on query mysql主从库在同步时会发生1062 L ...
- MS Sql Server 中主从库的配置和使用介绍(转)
网站规模到了一定程度之后,该分的也分了,该优化的也做了优化,但是还是不能满足业务上对性能的要求:这时候我们可以考虑使用主从库. 主从库是两台服务器上的两个数据库,主库以最快的速度做增删改操作+最新数据 ...
- CentOS 6.4 系统下的MySQL的主从库配置
首先了解到一. 二一.(MySQL下创建用户并且赋予权限)root用户创建yong用户的SQL语句 CREATE USER 'yong'@'localhost' IDENTIFIED BY 'yong ...
- 项目中通过Sorlj获取索引库中的数据
在开发项目中通过使用Solr所提供的Solrj(java客户端)获取索引库中的数据,这才是真正对项目起实质性作用的功能,提升平台的检索性能及检索结果的精确性 第一步,引入相关依赖的jar包 第二步,根 ...
- 【MYSQL】主从库查看及搭建
show slave status 查看从库信息 http://blog.csdn.net/lxpbs8851/article/details/7898716 搭建主从库 http://www. ...
- MYSQL主从库同步配置过程
MYSQL主从库同步配置过程 为了实现网站数据库的异地备份,采用了MySQL数据库主从同步配置,需要两台服务器分别作为主从库,当主库发生增删改等操作,会实时反映到从库,我的个人服务器配置如下: 主库为 ...
- mysql 主从库同步
#主库修改my.ini [mysqld] server log-bin=mysql-bin binlog-do-db=demo #从库修改my.ini [mysqld] server replicat ...
- 定时获取MySQL库的大小
定时获取MySQL库的大小 获取数据库单个库的大小命令 [root@admin ~]# cat db_size.txt mysql -h 192.8.1.1 -uUSER -pPASSWORD -e' ...
随机推荐
- [转]Greenplum 资源隔离的原理与源码分析
摘要: 背景 Greenplum是一个MPP的数据仓库系统,最大的优点是水平扩展,并且一个QUERY就能将硬件资源的能力发挥到极致. 但这也是被一些用户诟病的一点,因为一个的QUERY就可能占光所有的 ...
- 前端表单中有按钮button自动提交表单
问题描述 在设计表单时,表单内有一个按钮<button>,该按钮是用来获取其他数据或执行其他操作的.并不是让他提交表单. 解决方案 1) 设置 form 的 onsubmit='retur ...
- WEB服务器搭建–IIS
功能作用 IIS是一个World Wide Web server.Gopher server和FTP server全部包容在里面. IIS意味着你能发布网页,并且有ASP(Active Server ...
- C# string和byte[]的转换
转自 http://www.cnblogs.com/Mainz/archive/2008/04/09/String_Byte_Array_Convert_CSharp.html string类型转成b ...
- 修复 dji spark 的 micro sd/tf 存储卡里不能正常播放的视频文件
可能是因为 1.在没有正确的操作停止录像前,关掉了 spark 的电源 2.在 spark 没有完成视频存储前,关掉了 spark 的电源 总之在电脑里想查看存储卡里的视频时,发现居然无法播放,这就太 ...
- 《AndroidStudio每日一贴》2.高速查看项目中近期的变更
<AndroidStudio每日一贴>2.高速查看项目中近期的变更 高速查看项目中近期的变更,使用快捷键: option + shift +c 很多其它有用技巧请查看<Android ...
- mui封装做好的手机版网站为apk
BOSS提到的一个功能,就是把已经做好的手机网站http://xxx.com/m/home/index ,想着看起来应该蛮简单,一个html页面里就一个iframe就好了,然后宽度和高度都设置为100 ...
- Fluent UDF【4】:C语言
Fluent UDF利用的是C语言,本文简单介绍在UDF中经常会用到的C语言常识. 本文部分内容来自UDF手册. 1 C语言中的注释 C语言中的注释利用/*及*/来实现.例如: /*这是一个注释*/ ...
- window函数 resetAccumulator
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreem ...
- 关于 Nginx upstream keepalive 的说明
模块是 HttpUpstreamModule,配置的一个例子: [shell]upstream http_backend { server 127.0.0.1:8080; keepalive 1 ...