首页
Profile
Profile
Profile
Profile
Profile

AMAZON RDS MYSQL 做个外部从库 SLAVE

2015-06-17 阅读 255
RDS控制台,创建制度副本 登录MYSQL终端,执行 ``` call mysql.rds_stop_replication ```

MYSQLDUMP出数据库

``` mysqldump -h RDS instance endpoint -u user -p password --port=3306 --single-transaction --routines --triggers --databases database database2 --compress --compact | mysql -h MySQL host -u master user -p password --port 3306 ```

 配置从库

``` server-id = 2 replicate-do-db=xxx slave-skip-errors = 1032,1062,126,1114,1146,1048,1051,1396,1449,1060 ```

导入数据库

http://www.huilinwang.com/blog/post/272.html

开启从库同步

``` change master to master_host='xxx', master_user='xxx', master_password='xxx', MASTER_LOG_FILE='xxx', MASTER_LOG_POS=xxx; ``` ``` start slave; ```

查看

``` show slave status; ```

再次启动同步:

``` CALL mysql.rds_start_replication; ```

 

AMAZON RDS MYSQL SLAVE
更新于 2023年03月28日
 
陕ICP备13008705号-1 Chat Gpt Api