标签:mysq 技术 tar lib docke 数据 mysql8 lol eve
创建挂载数据目录和配置文件
mkdir -p /opt/mysql/data /opt/mysql/conf
touch /opt/mysql/conf/my.cnf
docker pull mysql
docker run --restart=always --name=mysql -p 3306:3306 -v /opt/mysql/conf/my.cnf:/etc/my.cnf -v /opt/mysql/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql
docker exec -it mysql /bin/bash
mysql -uroot -p123456
alter user ‘root‘@‘%‘ identified by ‘123456‘ password expire never;
alter user ‘root‘@‘%‘ identified with mysql_native_password by ‘123456‘;
flush privileges;
标签:mysq 技术 tar lib docke 数据 mysql8 lol eve
原文地址:https://www.cnblogs.com/haoxianrui/p/14397987.html