Websoft9 / CloudForms

Deploy application at Cloud infrastructure by Terraform
https://www.websoft9.com
2 stars 2 forks source link

容器版mariadb 主从复制实现 - pay #2

Open qiaofeng1227 opened 1 year ago

qiaofeng1227 commented 1 year ago

容器版本的mariadb主从复制: mysql容器版和宿主机安装只是在命令和文件路径有所差异:

  1. 使用mysql命令:sudo docker exec -it mariadb mysql -u mysqluser-p yourpassword
  2. 文件路径位置 MariaDB 数据目录: /data/apps/mariadb/data/mariadb_data MariaDB 配置文件: /data/apps/mariadb/src/conf.d/mysql.cnf 其他主从复制的操作和宿主机一样。
qiaofeng1227 commented 1 year ago

https://github.com/bitnami/containers/blob/main/bitnami/mariadb/docker-compose-replication.yml