码迷,mamicode.com
首页 > 数据库 > 详细

mysql 主主复制搭建用的命令

时间:2016-07-25 18:07:59      阅读:233      评论:0      收藏:0      [点我收藏+]

标签:

# mysql 容器的启动
docker run -d -p 3306:3306 -v /database_files/products/data:/var/lib/mysql -v /database_files/products/conf.d:/etc/mysql/conf.d -e MYSQL_ROOT_PASSWORD=xxx --name mysql-server mysql:5.7

grant all privileges on *.* to www@‘6.6.6.6‘ identified by ‘sss‘;
grant all privileges on *.* to www@‘6.6.6.5‘ identified by ‘sss‘;

change master to master_host=‘6.6.6.6‘,MASTER_PORT=3306,master_user=‘sync_user‘,master_password=‘Admin123‘,master_log_file=‘mysql-bin.000001‘,master_log_pos=592;

CREATE DATABASE CD_DB DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;

mysql 主主复制搭建用的命令

标签:

原文地址:http://www.cnblogs.com/huohongbin/p/5704324.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!