I came across the phenomenon that the MySQL container does not start up using Docker. I do not know the cause, but I solved it, so I will leave a note once
Apply & Restart with Use gRPC FUSE for file sharing disabled.
docker-compose up -d
To run
Creating network "xxx" with the default driver
Creating xxx_architecture_mysqldata_1 ... done
Creating xxx_mailhog_1 ... done
Creating xxx_architecture_mysql_1 ... done
Creating xxx ... done
However, an error caused by MySQL occurred while working.
docker ps
First
docker ps
I checked what was up, but the MySQL container didn't seem to be up. I also tried using docker exec to put it in a MySQL container ...
Error response from daemon:Container Container ID is not running
It was no good.
When I docker-compose up, it said "done", so I thought it was up.
In such a case, I can't say anything without looking at the log, so I'll check the log for the time being.
docker logs container ID
The log looks like this
2020-11-17 07:30:22+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.19-1debian10 started.
2020-11-17 07:30:23+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2020-11-17 07:30:23+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.19-1debian10 started.
2020-11-17T07:30:24.278825Z 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.
2020-11-17T07:30:24.279399Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.19) starting as process 1
2020-11-17T07:30:24.298133Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
2020-11-17T07:30:26.062069Z 1 [ERROR] [MY-011087] [Server] Different lower_case_table_names settings for server ('2') and data dictionary ('0').
2020-11-17T07:30:26.064235Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2020-11-17T07:30:26.064751Z 0 [ERROR] [MY-010119] [Server] Aborting
2020-11-17T07:30:26.944800Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.19) MySQL Community Server - GPL.
↓ Something has failed here
2020-11-17T07:30:26.064235Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2020-11-17T07:30:26.064751Z 0 [ERROR] [MY-010119] [Server] Aborting
It was annoying to google various things, so I rebuilt it.
docker-compose build --no-cache
Now that the build is done, let's take a look at the logs with docker logs.
2020-11-17 08:07:48+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.19-1debian10 started.
2020-11-17 08:07:49+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2020-11-17 08:07:49+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.19-1debian10 started.
2020-11-17T08:07:49.831146Z 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.
2020-11-17T08:07:49.831363Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.19) starting as process 1
2020-11-17T08:07:49.854161Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
2020-11-17T08:07:51.391894Z 1 [ERROR] [MY-011087] [Server] Different lower_case_table_names settings for server ('2') and data dictionary ('0').
2020-11-17T08:07:51.392387Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2020-11-17T08:07:51.392606Z 0 [ERROR] [MY-010119] [Server] Aborting
2020-11-17T08:07:52.248666Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.19) MySQL Community Server - GPL.
It's strange
this https://stackoverflow.com/questions/64146845/mysql-not-starting-in-a-docker-container-on-macos-after-docker-update
In Docker Desktop Preferences> Experimental Features Use gRPC FUSE for file sharing Disable and Apply & Restart
After that, when docker-compose up, it started up normally.
By the way, another project uses MySQL 5.7 with almost the same settings, and there was no problem even if Use gRPC FUSE for file sharing was enabled there. Is it a problem caused by different versions of MySQL?
Recommended Posts