Reputation: 4150
I have specified in my docker-compose.yml the version of MySql 8.0.0 and I am having some issues (that I did not have not specifying the version). What is wrong?
Below you can find my docker-compose.yml and error logs:
version: '3.7'
services:
db:
image: mysql:8.0.0
command: ["--default-authentication-plugin=mysql_native_password"]
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: symfony
MYSQL_PASSWORD: symfony
php:
build: ./php-fpm
ports:
- "9000:9001"
volumes:
- ./symfony:/var/www/symfony:cached
- ./logs/symfony:/var/www/symfony/var/log:cached
links:
- db
extra_hosts:
- "docker-host.localhost:127.0.0.1"
- "symfony.localhost:172.24.0.5"
nginx:
build: ./nginx
ports:
- "80:80"
links:
- php
volumes:
- ./logs/nginx:/var/log/nginx:cached
- ./symfony:/var/www/symfony:cached
elk:
image: willdurand/elk
ports:
- "81:80"
volumes:
- ./elk/logstash:/etc/logstash:cached
- ./elk/logstash/patterns:/opt/logstash/patterns:cached
- ./logs/symfony:/var/www/symfony/var/log:cached
- ./logs/nginx:/var/log/nginx:cached
and logs:
db_1 | 2019-06-25T11:12:28.129419Z 0 [Warning] TIMESTAMP with
implicit DEFAULT value is deprecated. Please use --
explicit_defaults_for_timestamp server option (see documentation for
more details).
db_1 | 2019-06-25T11:12:28.130523Z 0 [Note] mysqld (mysqld 8.0.0-
dmr) starting as process 1 ...
db_1 | 2019-06-25T11:12:28.134864Z 0 [Note] InnoDB: Using Linux
native AIO
db_1 | 2019-06-25T11:12:28.135137Z 0 [Note] Plugin 'FEDERATED' is
disabled.
db_1 | 2019-06-25T11:12:28.136567Z 1 [Note] InnoDB: PUNCH HOLE
support available
db_1 | 2019-06-25T11:12:28.136614Z 1 [Note] InnoDB: Mutexes and
rw_locks use GCC atomic builtins
db_1 | 2019-06-25T11:12:28.136620Z 1 [Note] InnoDB: Uses event
mutexes
db_1 | 2019-06-25T11:12:28.136623Z 1 [Note] InnoDB: GCC builtin
__atomic_thread_fence() is used for memory barrier
db_1 | 2019-06-25T11:12:28.136626Z 1 [Note] InnoDB: Compressed
tables use zlib 1.2.3
db_1 | 2019-06-25T11:12:28.137151Z 1 [Note] InnoDB: Number of
pools: 1
db_1 | 2019-06-25T11:12:28.137390Z 1 [Note] InnoDB: Using CPU
crc32 instructions
db_1 | 2019-06-25T11:12:28.139057Z 1 [Note] InnoDB: Initializing
buffer pool, total size = 128M, instances = 1, chunk size = 128M
db_1 | libnuma: Warning: /sys not mounted or invalid. Assuming one
node: No such file or directory
db_1 | mbind: Operation not permitted
db_1 | mbind: Operation not permitted
db_1 | mbind: Operation not permitted
db_1 | mbind: Operation not permitted
db_1 | 2019-06-25T11:12:28.150384Z 1 [Note] InnoDB: Completed
initialization of buffer pool
db_1 | 2019-06-25T11:12:28.152938Z 0 [Note] InnoDB: If the mysqld
execution user is authorized, page cleaner thread priority can be
changed. See the man page of setpriority().
db_1 | 2019-06-25T11:12:28.169513Z 1 [ERROR] InnoDB: Unsupported
redo log format. The redo log was created with MySQL 8.0.15. Please
follow the instructions at
http://dev.mysql.com/doc/refman/8.0/en/upgrading-downgrading.html
db_1 | 2019-06-25T11:12:28.169587Z 1 [ERROR] InnoDB: Plugin
initialization aborted with error Generic error
db_1 | 2019-06-25T11:12:28.774335Z 1 [ERROR] Failed to initialize
DD Storage Engine
db_1 | 2019-06-25T11:12:28.774965Z 0 [ERROR] Data Dictionary
initialization failed.
db_1 | 2019-06-25T11:12:28.775132Z 0 [ERROR] Aborting
db_1 |
db_1 | 2019-06-25T11:12:28.775198Z 0 [Note] Binlog end
db_1 | 2019-06-25T11:12:28.775614Z 0 [Note] Shutting down plugin
'InnoDB'
db_1 | 2019-06-25T11:12:28.775986Z 0 [Note] Shutting down plugin
'MyISAM'
db_1 | 2019-06-25T11:12:28.776099Z 0 [Note] Shutting down plugin
'CSV'
db_1 | 2019-06-25T11:12:28.779905Z 0 [Note] mysqld: Shutdown
complete
db_1 |
docker-symfony4-udggui_db_1 exited with code 1
Upvotes: 3
Views: 10045
Reputation: 31584
When you did not specify the version as image: mysql
, it will use the latest version. At this time the question was raised, it's 8.0.16
, see this.
When you specify the version as image: mysql:8.0.0
, you just use an old version of mysql.
Unfortunately, this version not compatible with new docker as next:
The server use mbind for NUMA (non-uniform memory access) operations, but Docker blocks this access by default. It's possible to provide a custom profile that allows it, but the syntax of the profile files has changed across Docker versions, so it's kind of messy.
That means, at old time this image work, but now docker upgraded, the mysql image should do corresponding changes. And, 8.0.16
which currently the latest, already made this fix, so it's ok. Detail refers to next discussion:
https://github.com/docker-library/mysql/issues/303
https://github.com/docker-library/mysql/issues/422
Upvotes: 9