docker启动mysql失败
root@ecs-kc1-small-1-linux:~# docker run -p 3306:3306 mysql:8-oracle
2022-03-05 13:40:49+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.28-1.el8 started.
2022-03-05 13:40:50+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2022-03-05 13:40:50+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.28-1.el8 started.
2022-03-05 13:40:50+00:00 [ERROR] [Entrypoint]: Database is uninitialized and password option is not specified
You need to specify one of the following:
- MYSQL_ROOT_PASSWORD
- MYSQL_ALLOW_EMPTY_PASSWORD
- MYSQL_RANDOM_ROOT_PASSWORD
输入命令,当前设置的密码为root
docker run --name mysql -d -it -p 3306:3306 -e MYSQL_ROOT_PASSWORD=root mysql:8-oracle



本文来自博客园,作者:.net&new,转载请注明原文链接:https://www.cnblogs.com/wugh8726254/p/17430837.html
浙公网安备 33010602011771号