docker pull mysql
docker images
docker run --name mysq.db -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 -d -v /home/mysql/:/var/lib/mysql mysql --lower_case_table_names=1
注:参数顺序一定要对,--lower_case_table_names=1要加在镜像名后面,镜像名前面是参数,后面是mysql配置,不然会报错
注:--lower_case_table_names=1 只能在初始化时配置
docker exec -it mysql.db /bin/bash
mysql -uroot -p
show global variables like '%lower_case%';
感谢:https://www.cnblogs.com/ZhengHengWU/p/12882943.html