0

I run the following command in order to run MySql on a container over my local machien

run --name microservicecourse -p 3306:3306 -e MYSQL_DATABASE= Courses -e 
MYSQL_ROOT_PASSWORD=my-username! -e MYSQL_USER= root -e MYSQL_PASSWORD= my-username! -d mysql:5.7.38 --explicit_defaults_for_timestamp

Based on what @Aakash, said in this link, I even tried to type the password, rather than copy-paste, but it did not help me.

However, when i run it, it gives me:

docker: invalid reference format: repository name must be lowercase.

As i can see, the microservicecourse is all in lower case, so why i am getting this error and how i can fix it ?

Jeff
  • 7,767
  • 28
  • 85
  • 138
  • 1
    You have extra spaces after a couple of the `-e NAME=` options; so you're setting `MYSQL_DATABASE` to an empty string, running an image named `Courses` (with a capital `C`, hence the error message), with a command `-e MYSQL_ROOT_PASSWORD=...`. – David Maze Jun 18 '23 at 12:03

0 Answers0