Official mysql container

Im having an issue with the mysql official container from docker hub. Every time I start the container I get

error: database is uninitialized and MYSQL_ROOT_PASSWORD not set Did you forget to add -e MYSQL_ROOT_PASSWORD=... ?

Someone told me that is a problem with the docker file, but I cant seem to find the Dockerfile. Any suggestion?

PS Im a complete n00b :smiley:

Use MariaDB.

Hi there,

You’ll need to add an environment variable (working to make this easier). Kitematic can do this in the container settings pane.

Just add a new environment variable for MYSQL_ROOT_PASSWORD and hit save! Off to the races!

An important a heads up: at the moment the official mysql container doesn’t work with Kitematic due to a file permission issue (working on a patch as we speak that fixes this). Stay tuned to this issue here:


1 Like

Just an FYI that the file permission issue is somewhat fixed.

With Kitematic 0.5.12+, if you start a new MySQL container it won’t automatically mount volumes and should work once you set the MYSQL_ROOT_PASSWORD environment variable.

How I can fix the problem on my ubuntu server?

I got the answer by

Thanks Morgan. I noticed that this issue still persists (even in the Jan 2016 image) but gets resolved with the work around you suggested.
Adding the ‘MYSQL_ROOT_PASSWORD’ and a random value solves it and immediately runs MySQL.