1
1

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 1 year has passed since last update.

M1MacでDockerのMySQL5.7が使えない

Posted at

備忘録

修正内容

  • linux/amd64に対応しているimageをdockethubから探して変更
  • MySQL接続エラー対応でMYSQL_ROOT_HOST変数を追加

docker-compose.ymlの修正

修正前

services:
  db:
    image: mysql:5.7
    ports:
      - "3306:3306"
    environment:
      - MYSQL_ALLOW_EMPTY_PASSWORD=1

修正後

services:
  db:
    image: mysql/mysql-server:5.7
    ports:
      - "3306:3306"
    environment:
      - MYSQL_ALLOW_EMPTY_PASSWORD=1
      - MYSQL_ROOT_HOST=%
1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?