-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MySQL init process failed. #251
Comments
Turns out my config was wrong
for future people I debuged it with |
For the record, you were actually hitting a 30-second timeout in the image's init script. You happen to have accelerated your initial import enough to take less than 30 seconds when you disabled the binlog. I hit the same issue and finally found https://github.com/docker-library/mysql/blob/master/5.5/docker-entrypoint.sh#L101 where the 30-second timeout is hard-coded: for i in {30..0}; do
if echo 'SELECT 1' | "${mysql[@]}" &> /dev/null; then
break
fi
echo 'MySQL init process in progress...'
sleep 1
done
if [ "$i" = 0 ]; then
echo >&2 'MySQL init process failed.'
exit 1
fi Edit: I see there are already pull requests open since April 6, 2016 on this problem: #288 and #159. I hope they'll eventually get merged. |
@AdriVanHoudt sorry for nuking this thread but I could not see the difference of the -[mysql]
-binlog_format = ROW
+[mysqld]
character_set_server = utf8
-collation_database = utf8_bin
collation_server = utf8_general_ci
explicit_defaults_for_timestamp = OFF
sql_mode = STRICT_TRANS_TABLES |
I had this problem on mariadb. eventually there is a new environment variable available: MYSQL_START_TIMEOUT=900 the patch comes from this PR: https://github.com/docker-library/mysql/pull/288/files With this variable, initialization of big data files in a docker container successfully gets to the end. I think I also read something about an error message that is displayed if the server was not initialized and the root password was not set. I got it to work on mysql docker container but unfortunately I think, this variable is not integrated to https://github.com/MariaDB/server yet as I could not get it to work there. |
My command:
$ docker run -d -p 3307:3306 --name sf-mysql -v $(pwd)/mysql:/etc/mysql/conf.d -e MYSQL_ALLOW_EMPTY_PASSWORD=yes mysql:5.6.31
config-file.cnf located in
$(pwd)/mysql
:Log from docker:
Things I tried from looking at other issues:
Only other thing I can imagine is some permission issue like http://stackoverflow.com/a/36265931/2339622
Anyone has an idea?
The text was updated successfully, but these errors were encountered: