mysql在从库备份制作新从库
来源:互联网 发布:windows不能识别usb 编辑:程序博客网 时间:2024/06/01 18:20
在已经存在的主从结构中,如果想要新添加从库,可以在主库上dump出备份在制作新从库,也可以在之前的从库上做备份,使用从库的备份制作新从库。
/usr/local/mysql-5.7.18/bin/mysqldump -u root -S /my.sock -p–default-character-set=utf8 –single-transaction –include-master-host-port=true –dump-slave=2 baixyu>baixyu.sql
使用这个命令在制作备份的时候,从库上的同步会中断,在备份完成后,会继续正常同步。对于dump-slave的说明
–dump-slave[=#] This causes the binary log position and filename of the
master to be appended to the dumped data output. Setting
the value to 1, will printit as a CHANGE MASTER command
in the dumped data output; if equal to 2, that command
will be prefixed with a comment symbol. This option will
turn –lock-all-tables on, unless –single-transaction is
specified too (in which case a global read lock is only
taken a short time at the beginning of the dump - don’t
forget to read about –single-transaction below). In all
cases any action on logs will happen at the exact moment
of the dump.Option automatically turns –lock-tables off.
–single-transaction
Creates a consistent snapshot by dumping all tables in a
single transaction. Works ONLY for tables stored in
storage engines which support multiversioning (currently
only InnoDB does); the dump is NOT guaranteed to be
consistent for other storage engines. While a
–single-transaction dump is in process, to ensure a
valid dump file (correct table contents and binary log
position), no other connection should use the following
statements: ALTER TABLE, DROP TABLE, RENAME TABLE,
TRUNCATE TABLE, as consistent snapshot is not isolated
from them. Option automatically turns off –lock-tables.
- mysql在从库备份制作新从库
- xtrabackup 备份从库,建立新的从库
- MySQL 多主一从备份
- MySQL 多主一从备份 .
- MySQL 主-从备份
- mysql通过物理备份主库方式恢复从库
- 技术项目 - MySQL从库不适合用于备份
- mysql从全库备份中恢复某个表
- Mysql 从库跳过
- mysql从库迁移
- 创建MySQL从库
- mysql从库重建
- TokyoTyrant-备份恢复和增加从库
- 多层备份--从库slave变主库master
- 使用mysql企业版备份软件来设置一个从库:Setting Up a New Replication Slave
- oracle11g active dataguard dupliacte制作从库
- mysql主从备份在不停机的情况下新建slave从机。
- MySQL从库搭建步骤
- p6spy监控jdbc连接oracle sql
- 深入理解 Java 虚拟机--晚期(运行期)优化
- 01、react 之初介绍
- 有关数据溢出的总结
- Ubuntu安装微软字体
- mysql在从库备份制作新从库
- fb.h注释
- 手势移动的位置转换
- windows和linux 环境下安装 lxml python
- [P1314]聪明的质检员
- 使用Jmeter进行http接口测试
- jsp中4个作用域
- Linux下struct timeval结构体
- MySql-如何查询删除数据表重复记录