拉镜像:
docker pull mysql:latest
启动容器:
docker run -p 3306:3306 --name mysql-case \
-v /mydata/mysql/log:/var/log/mysql \
-v /mydata/mysql/data:/var/lib/mysql \
-v /mydata/mysql/conf:/etc/mysql/conf.d \
-e MYSQL_ROOT_PASSWORD=123456 \
-d mysql:latest --lower_case_table_names=0
进入容器:
docker exec -it mysql-case /bin/bash
登录mysql:
mysql -u root -p
授权可远程登录:
grant all privileges on *.* to root@'%' with grant option;
标签:151,case,mydata,conf,mysql,3306,docker
From: https://blog.51cto.com/u_14816966/5959972