5
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Docker Toolboxでlaradockを動かそうとしたらmysqlが起動しなかった

Last updated at Posted at 2018-10-25

Docker Toolboxでlaradockを動かそうとしたらmysqlが起動しない!
エラーメッセージでググったらこちらの記事がヒット。
https://qiita.com/lara_bell/items/d4bd1340a5cc7dfcfcb4
この記事を参考に修正したところ、今度は違うエラーが。

$ docker logs 2f9127b2dd11
Initializing database
2018-10-25T13:48:24.815150Z 0 [Warning] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2018-10-25T13:48:24.815204Z 0 [Warning] 'NO_AUTO_CREATE_USER' sql mode was not set.
2018-10-25T13:48:24.826043Z 0 [Warning] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
2018-10-25T13:48:25.379538Z 0 [ERROR] InnoDB: Operating system error number 22 in a file operation.
2018-10-25T13:48:25.379677Z 0 [ERROR] InnoDB: Error number 22 means 'Invalid argument'
2018-10-25T13:48:25.379721Z 0 [ERROR] InnoDB: File ./ib_logfile101: 'aio write' returned OS error 122. Cannot continue operation
2018-10-25T13:48:25.379756Z 0 [ERROR] InnoDB: Cannot continue operation.

再度エラーメッセージでググって解決方法を探したところ、docker-compose.ymlをいじれば良さそう。

    mysql:
      build:
        context: ./mysql
        args:
          - MYSQL_VERSION=${MYSQL_VERSION}
      environment:
        - MYSQL_DATABASE=${MYSQL_DATABASE}
        - MYSQL_USER=${MYSQL_USER}
        - MYSQL_PASSWORD=${MYSQL_PASSWORD}
        - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
        - TZ=${WORKSPACE_TIMEZONE}
      volumes:
        - ${DATA_PATH_HOST}/mysql:/var/lib/mysql
        - ${MYSQL_ENTRYPOINT_INITDB}:/docker-entrypoint-initdb.d
      ports:
        - "${MYSQL_PORT}:3306"
      networks:
        - backend
      command: --innodb-use-native-aio=0 #コイツを追加!!!!!

一番最後のを追記したら無事動いた。

5
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?