mysql

  1. #!/bin/bash
  2. cur_dir=`pwd`
  3. docker stop ycxi-mysql
  4. docker rm ycxi-mysql
  5. docker run --net ycxi-network --name ycxi-mysql -v ${cur_dir}/conf:/etc/mysql/conf.d -v ${cur_dir}/data:/var/lib/mysql -p 3309:3306 -e MYSQL_ROOT_PASSWORD=aA111111 -d mysql:8
  1. [mysqld]
  2. character-set-server=utf8mb4
  3. [client]
  4. default-character-set=utf8mb4
  5. [mysql]
  6. default-character-set=uft8mb4

redis

  1. docker stop redis
  2. docker rm redis
  3. docker run -idt --net ycxi-network -p 6380:6379 -v `pwd`/data:/data --name redis -v `pwd`/redis.conf:/etc/redis/redis_default.conf hub.c.163.com/public/redis:2.8.4

修改redis.conf