1. Home
  2. Docs
  3. 秒杀系统
  4. 服务端架构
  5. MySQL集群

MySQL集群

主从同步、读写分离、分片分库分表

部署

git clone https://github.com/baojingyu/docker-mycat-mysql.git

cd docker-mycat-mysql && sudo docker-compose up -d

QAF

无法启动? initialize specified but the data directory has files in it. Aborting

s1       | Initializing database
s1       | 2021-01-25T06:51:46.498623Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
s1       | 2021-01-25T06:51:46.501302Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
s1       | 2021-01-25T06:51:46.501325Z 0 [ERROR] Aborting

处理:

  1. 删除原有的mysql:5.7版本的镜像
  2. 设置文件夹权限
  3. 删除data/下的文件

相关资料

docker-mycat-mysql
官网mycat

Was this article helpful to you? Yes No

How can we help?