-e MYSQL_ROOT_PASSWORD=my-secret-pw
-v /my/custom:/etc/mysql/conf.d
docker run -it --rm mysql:tag --verbose --help
docker run --name some-mysql -v /my/own/datadir:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql:tag
docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql:tag
docker run -it --network some-network --rm mysql mysql -hsome-mysql -uexample-user -p
docker run -it --rm mysql mysql -hsome.mysql.host -usome-mysql-user -p
docker exec -ti mysql sh -c 'exec mysql -uroot -p123456' < /root/test1.sql
docker run --name mysql -p 3306:3306 -v /mysql/datadir/:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql:5.6.36
# 默认外部机器是访问不到3306的,需要开启IP转发
vi /etc/sysctl.conf
net.ipv4.ip_forward=1
https://blog.csdn.net/a772304419/article/details/121697939
docker run --name mysql -p 3306:3306 -v /mysql/datadir1/:/var/lib/mysql -d mysql:5.6.36 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
标签:run,--,mysql,3306,docker,ROOT
From: https://www.cnblogs.com/liudianer/p/17282154.html