当前位置:Gxlcms > 数据库问题 > mysql 主主复制搭建用的命令

mysql 主主复制搭建用的命令

时间:2021-07-01 10:21:17 帮助过:2人阅读

# 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 主主复制搭建用的命令

标签:

人气教程排行