Skip to content
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 Container fails to start #1492

Closed
SirNeural opened this issue Apr 21, 2018 · 13 comments

Comments

@SirNeural
Copy link

commented Apr 21, 2018

Info:

  • Docker version ($ docker --version): Docker version 18.04.0-ce, build 3d479c0
  • Laradock commit ($ git rev-parse HEAD): 871a9d0
  • System info (Mac, PC, Linux): Linux
  • System info disto/version: Ubuntu 17.10 x64

Issue:

MySQL container does not start up when running docker-compose up mysql,
I've tried a few different releases, 6.0.0, 6.0.1, and the 7.0.0 release and I get the same error every time.

Expected behavior:

MySQL container should start when given the command

Reproduce:

git checkout v6.0.0
docker-compose up mysql

Relevant Code:

Error report here

# docker-compose up mysql
WARNING: The APACHE_DOCUMENT_ROOT variable is not set. Defaulting to a blank string.
Starting laradock_mysql_1
Attaching to laradock_mysql_1
mysql_1                |
mysql_1                | ERROR: mysqld failed while attempting to check config
mysql_1                | command was: "mysqld --verbose --help"
mysql_1                |
mysql_1                | 2018-04-20T23:56:30.162694Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
mysql_1                | 2018-04-20T23:56:30.162798Z 0 [ERROR] [MY-011071] [Server] /usr/sbin/mysqld: Error while setting value 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' to 'sql_mode'
mysql_1                | 2018-04-20T23:56:30.165911Z 0 [ERROR] [MY-010119] [Server] Aborting
laradock_mysql_1 exited with code 1
@andrzejkupczyk

This comment has been minimized.

Copy link

commented Apr 22, 2018

@naughtyjoint

This comment has been minimized.

Copy link

commented Apr 23, 2018

I had the same issue last night, I think it's the mysql version problem. What I did was

  • edited laradock/.env, set MYSQL_VERSION from latest to 5.7

  • deleted ~/.laradock/mysql/ directory completely (Warning, This may delete your data ! )

  • then re-build docker-compose build mysql

  • docker-compose up -d mysql as usual

Hope this helps :)

@zlanich

This comment has been minimized.

Copy link

commented Apr 23, 2018

@naughtyjoint's answer also fixed mine.

@carloshperes

This comment has been minimized.

Copy link

commented Apr 24, 2018

Thanks @naughtyjoint

@ccennis

This comment has been minimized.

Copy link

commented Apr 25, 2018

i also had to remove the sql_mode line from the my.cnf but then deleting the dir and rebuilding helped. thanks!!

@linganmin

This comment has been minimized.

Copy link

commented Apr 27, 2018

@naughtyjoint Thanks

@Dryr

This comment has been minimized.

Copy link
Contributor

commented May 1, 2018

Looks like NO_AUTO_CREATE_USER is causing the issue. Removing it from the 'mysql/my.cnf' file seems to fix the issue as well.

@yabasha

This comment has been minimized.

Copy link

commented May 7, 2018

thanx @naughtyjoint I struggled with mysql container issue for one whole night your answer solved my issue.

@crosspluser

This comment has been minimized.

Copy link

commented May 9, 2018

🤣
MySQL 8.0.11 remove the ’NO_AUTO_CREATE_USER‘ from sql-mode.
/mysql/my.cnf [mysqld]
STRICT_TRANS_TABLES STRICT_TRANS_TABLES cannot be existing at the same time.

MySQL 5.7: Using GRANT to create users. Instead, use CREATE USER. Following this practice makes the NO_AUTO_CREATE_USER SQL mode immaterial for GRANT statements, so it too is deprecated.
MySQL 8.0.11: Using GRANT to create users. Instead, use CREATE USER. Following this practice makes the NO_AUTO_CREATE_USER SQL mode immaterial for GRANT statements, so it too is removed.

@pack254

This comment has been minimized.

Copy link

commented May 9, 2018

@naughtyjoint Thank a lot for your answer is solved my life, have been straggled to solve this problem for whole day.

Cheers

@Journeyerr

This comment has been minimized.

Copy link

commented Jun 21, 2018

Excuse me, How to set up the password for Redis

@bestlong bestlong closed this in 1d9cbd7 Jun 27, 2018

@nguyencongkrb

This comment has been minimized.

@fernandoajn

This comment has been minimized.

Copy link

commented Mar 11, 2019

Thanks @naughtyjoint, that still works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.