使用mysql企业版备份软件来设置一个从库:Setting Up a New Replication Slave
来源:互联网 发布:下载qq软件2016 编辑:程序博客网 时间:2024/05/17 07:25
Setting Up a New Replication Slave
If you use MySQL replication, MySQL Enterprise Backup allows you to set up a slave database without
stopping the master, by backing up the master and restoring that backup on a new slave server.
2. Edit the my.cnf file of the new slave and put skip-slave-start under the [mysqld] section.
3. Start the new slave mysqld (version >= 5.1). It prints the latest MySQL binlog position the backup
knows of.
…
InnoDB: Last MySQL binlog file position 0 128760128, file name ./hundin-bin.006
…
Note that InnoDB only stores the binlog position information to its tablespace at a transaction commit.
To make InnoDB aware of the current binlog position, you must run at least one transaction
while binlogging is enabled.
4. Use the CHANGE MASTER SQL command on the slave to initialize it properly. For example:Restoring a Master Database in Replication
78
CHANGE MASTER TO
MASTER_LOG_FILE='hundin-bin.006',
MASTER_LOG_POS=128760128;
5. Set the statuses of any events that were copied from the master to SLAVESIDE_DISABLED. For
example:
mysql> UPDATE mysql.event SET status = 'SLAVESIDE_DISABLED';
6. Start replication in the new slave with the SLAVE START SQL command.
7. Remove the line skip-slave-start from the my.cnf file of the slave.
If you use MySQL replication, MySQL Enterprise Backup allows you to set up a slave database without
stopping the master, by backing up the master and restoring that backup on a new slave server.
1. /opt/mysql/meb-3.8/bin/mysqlbackup --port=3306 --protocol=tcp --user=root --password=***** --backup-dir=/tempmnt/slavefrom8 backup-and-apply-log
cp /var/lib/mysql/mysql-bin.* /tempmnt/slavefrom8/binarylog/
/tempmnt/此目录为从服务器的NFS目录。
Take the backup, transfer it to the slave server, use mysqlbackup with the apply-log option to
prepare it, and put the restored backup and the log files in the right directories for the new slave.2. Edit the my.cnf file of the new slave and put skip-slave-start under the [mysqld] section.
3. Start the new slave mysqld (version >= 5.1). It prints the latest MySQL binlog position the backup
knows of.
…
InnoDB: Last MySQL binlog file position 0 128760128, file name ./hundin-bin.006
…
Note that InnoDB only stores the binlog position information to its tablespace at a transaction commit.
To make InnoDB aware of the current binlog position, you must run at least one transaction
while binlogging is enabled.
4. Use the CHANGE MASTER SQL command on the slave to initialize it properly. For example:Restoring a Master Database in Replication
78
CHANGE MASTER TO
MASTER_LOG_FILE='hundin-bin.006',
MASTER_LOG_POS=128760128;
5. Set the statuses of any events that were copied from the master to SLAVESIDE_DISABLED. For
example:
mysql> UPDATE mysql.event SET status = 'SLAVESIDE_DISABLED';
6. Start replication in the new slave with the SLAVE START SQL command.
7. Remove the line skip-slave-start from the my.cnf file of the slave.
阅读全文
0 0
- 使用mysql企业版备份软件来设置一个从库:Setting Up a New Replication Slave
- 17.1.1.7 Setting Up Replication with New Master and Slaves 设置复制使用新的master和slaves:
- 17.1.1.7 Setting Up Replication with New Master and Slaves
- 17.1.1.8?Setting Up Replication with Existing Data设置复制使用存在的数据
- 17.1.1.7 Setting Up Replication with New Master and Slaves 设置复制对于新的Master和Slaves:
- Setting up a new remote git repository
- setting up a new remote git repository
- Mysql 5.5 replication 多数据库主从备份Master-Slave配置总结
- MySQL Master-Slave Replication
- MySQL Master-Slave Replication
- 17.1.1.2 Setting the Replication Slave Configuration
- 17.1.1.2 Setting the Replication Slave Configuration
- 17.1.1.2 Setting the Replication Slave Configuration
- CocosBuilder用户手册中文版:2. Setting up a New Project
- Setting up a new Typescript 1.9 and React project
- xtrabackup备份方式搭建一个mysql slave
- 搭建mysql master-slave replication
- MySQL Master Slave Replication配置
- Erlang到底好在哪里 -- 聊聊我使用Erlang的经历与感受
- java的Exchanger 两个线程可以交换对象Demo
- GoEasy实现后端向前端页面的推送
- iOS开发之xcode统计项目代码行数
- 神经网络入门(neural network)---初级应用篇
- 使用mysql企业版备份软件来设置一个从库:Setting Up a New Replication Slave
- MyBatis Generator中的新功能
- char *p="abc"与char p[]="abc"的不同
- html中table导出Excel
- python QQ邮箱发送邮件实例
- java synchronized
- kafka : A broker is already registered on the path /brokers/ids/1006. This proba
- Android PopupWindow 左侧弹窗(模拟菜单)
- HTML5新控件