docker mysql 安装

docker pull mysql

#启动
docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=yaoyao1234 -d mysql

#进入容器
docker exec -it mysql bash

#登录mysql
mysql -u root -p
ALTER USER 'root'@'localhost' IDENTIFIED BY 'xxxx1234';

#添加远程登录用户
CREATE USER 'yaoyao'@'%' IDENTIFIED WITH mysql_native_password BY 'xxxx1234';
GRANT ALL PRIVILEGES ON *.* TO 'yaoyao'@'%';

上一篇:JSPatch 动态更新,bug修复


下一篇:mysql创建新用户并授权限