mysql安装配置
作者:互联网
1、下载镜像
docker pull mysql/mysql-server
2、运行容器
docker run -d -p 3306:3306 --name [Name] [ImageName]
//示例
docker run -d -p 3306:3306 --name mysql01 mysql/mysql-server
3、查看安装日志
docker logs mysql01
4、进入容器
docker exec -it mysql01 bash
5、修改root密码
set password for 'root'@'localhost'='123'
navicat 连接 mysql 出现Client does not support authentication protocol requested by server
解决方案:
alter user 'root'@'localhost' identified with mysql_native_password by '123';
6、创建新的用户名和密码
mysql
docker run -d -p 3306:3306
-e mysql_user='jesee'
-e mysql_password='123'
-e mysql_root_password='123'
--name mysql01 mysql/mysql-server
--character-set-server=utf8
--collation-server=utf8_general_ci
标签:mysql01,配置,server,mysql,3306,docker,password,安装 来源: https://www.cnblogs.com/hulala/p/10393807.html