Help us understand the problem. What is going on with this article?

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

More than 1 year has passed since last update.

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 #コイツを追加!!!!!

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

pistachio1000g
最近はLaravelとVueがお気に入り
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした