[ERROR] [Entrypoint]: Database is uninitialized and password option is not specified

0 votes

Hi Guys,

I am trying to launch one mysql container in docker, but It shows me the below error.

[root@vm1 ~]# docker run -it --name mysql mysql:latest
2020-04-14 04:55:17+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.19-1debian10 started.
2020-04-14 04:55:18+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2020-04-14 04:55:18+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.19-1debian10 started.
2020-04-14 04:55:18+00:00 [ERROR] [Entrypoint]: Database is uninitialized and password option is not specified


How can I solve this error?

Apr 14 in Docker by akhtar
• 10,580 points
203 views

1 answer to this question.

0 votes

Hi@akhtar,

As we know mysql database requires user name and password, when we try to login. That is why in docker, mysql image requires some environment variable to login in that image. Use the below given command.

$ docker run -it -e MYSQL_ROOT_PASSWORD=abc --name mysql mysql:latest

For more information, go through the below given link.

$ https://hub.docker.com/_/mysql
answered Apr 14 by MD
• 23,050 points

Related Questions In Docker

0 votes
1 answer

Docker Machine error: Hyper-V PowerShell Module is not available

 The reason is the version of the ...READ MORE

answered Sep 6, 2018 in Docker by Tyrion anex
• 8,370 points
216 views
+1 vote
4 answers

COPY is not working in Docker

I had the exact same issue. I ...READ MORE

answered May 6, 2019 in Docker by Emilia
4,936 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 57,530 points
538 views
0 votes
1 answer
0 votes
1 answer

run script shell inside docker app and mongodb container not working?

Hi, I think this error occurs because you ...READ MORE

answered Mar 9 in Docker by MD
• 23,050 points
348 views