環境
macOS Mojave 10.14.4
Docker version 18.06.1-ce, build e68fc7a
やりたいこと
Docker で MySQL5.5.62 の環境を作っています。
docker-compose.yml を作成して、 docker-compose up -d mysql
で起動しようとしても Exit 1
となってしまいます
発生している問題・エラーメッセージ
% docker ps -a | grep mysql 01c09ae4e2bd mysql:5.5.62 "docker-entrypoint.s…" About an hour ago Exited (1) About an hour ago
% docker logs 01c09ae4e2bd ERROR: mysqld failed while attempting to check config command was: "mysqld --verbose --help --log-bin-index=/tmp/tmp.dXN5pYI5QN" 190822 13:54:12 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled 190822 13:54:12 [Note] mysqld (mysqld 5.5.62) starting as process 9 ... 190822 13:54:12 [Note] Plugin 'FEDERATED' is disabled. 04:54:12 UTC - mysqld got signal 11 ; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail. key_buffer_size=8388608 read_buffer_size=131072 max_used_connections=0 max_threads=151 thread_count=0 connection_count=0 It is possible that mysqld could use up to key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 338512 K bytes of memory Hope that's ok; if not, decrease some variables in the equation. Thread pointer: 0x7ffced5242e0 Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... stack_bottom = 7ffced527120 thread_stack 0x40000 mysqld(my_print_stacktrace+0x35)[0x7a99d5] mysqld(handle_fatal_signal+0x4a4)[0x684974] /lib/x86_64-linux-gnu/libpthread.so.0(+0x110e0)[0x7fb757b7f0e0] mysqld(_Z18ha_resolve_by_nameP3THDPK19st_mysql_lex_string+0x91)[0x688881] mysqld(_Z14open_table_defP3THDP11TABLE_SHAREj+0x193f)[0x60906f] mysqld(_Z15get_table_shareP3THDP10TABLE_LISTPcjjPij+0x1b2)[0x54d2a2] mysqld(_Z10open_tableP3THDP10TABLE_LISTP11st_mem_rootP18Open_table_context+0x47d)[0x554cfd] mysqld(_Z11open_tablesP3THDPP10TABLE_LISTPjjP19Prelocking_strategy+0x48d)[0x55638d] mysqld(_Z20open_and_lock_tablesP3THDP10TABLE_LISTbjP19Prelocking_strategy+0x44)[0x556dd4] mysqld[0x5951f5] mysqld(_Z11plugin_initPiPPci+0xa04)[0x598a34] mysqld[0x517f7a] mysqld(_Z11mysqld_mainiPPc+0x44d)[0x51b93d] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x7fb7569232e1] mysqld[0x510959] Trying to get some variables. Some pointers may be invalid and cause the dump to abort. Query (0): Connection ID (thread ID): 0 Status: NOT_KILLED The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains information that should help you find out what is causing the crash.
該当のソースコード
・docker-compose.yml
version: '3.5' services: mysql: image: mysql:5.5.62 environment: - MYSQL_DATABASE=app - MYSQL_ROOT_PASSWORD=password - TZ=Asia/Tokyo volumes: - mysql_db:/var/lib/mysql - ./docker/mysql/conf.d:/etc/mysql/conf.d - ./docker/mysql/init:/docker-entrypoint-initdb.d volumes: mysql_db:
・./docker/mysql/conf.d/my.cnf
[mysqld] character-set-server=utf8mb4 [client] default-character-set=utf8mb4 [mysql] default-character-set=utf8mb4
・./docker/mysql/init/ddl.sql
CREATE DATABASE IF NOT EXISTS test CHARACTER SET utf8;
試したこと
https://kmiya-bbm.hatenablog.com/entry/2019/03/11/212926
こちらでホストにMySQLがインストールされているとMySQLのコンテナが起動しないことがあるとのことなので、MySQLをアンインストールしました。
MySQLのバージョンを5.7にしたら動きました。。
あなたの回答
tips
プレビュー