下载下方的zip文件,然后执行docker-compose up -dmysql-slave配置.zip进入master的容器docker exec -it mysql_master bash
# 刚开始默认没密码
mysql
# 支持root用户允许远程连接mysql数据库
mysql> grant all privileges on *.* to 'root'@'%' ident...
使用mysql读写分离前应先配置mysql主从,参见下面文档配置主从wget https://archive.apache.org/dist/shardingsphere/5.0.0/apache-shardingsphere-5.0.0-shardingsphere-proxy-bin.tar.gz
tar -zxvf apache-shardingsphere-5.0.0-sha...
CREATE USER 'readonly'@'%' IDENTIFIED BY 'hudongtang2020';
GRANT SELECT ON activity_platform.* TO 'readonly'@'%';
GRANT SELECT ON activity_question.* TO 'readonly'@'%';
GRANT SELECT ON activity_v...