LoginSignup
1
0

More than 1 year has passed since last update.

M1 MacのDockerでnativeのarm 64版 MySQL Server 8動くよ

Posted at

M1 MacのDockerでMySQLを動かすとき、x86 emulator機能を使う記事が多いですが、MySQL 8.0はarm64にも対応しているのでmysql/mysql-server:8.0を使うと軽く動かせます。

デフォルト設定ではlocalhostからしか接続できないので、docker-compose.ymlでは下記のようにMYSQL_ROOT_HOSTを指定してそれを回避しています。

docker-compose.yml
  mysql:
    image: mysql/mysql-server:8.0
    environment:
      MYSQL_ROOT_PASSWORD: "passwd"
      MYSQL_ROOT_HOST: '%' # https://zenn.dev/ryo_kawamata/articles/mysql-connect-error
1
0
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
0