#author("2022-04-19T05:11:50+00:00","default:src128","src128") #author("2022-04-19T05:20:01+00:00","default:src128","src128") &tag(Homebrew/mysql); *目次 [#id978086] #contents *参考情報 [#r126b57e] -[[Homebrew]] -[[./古い情報]] -[[./古い情報20220419]] *インストール: 2022/04/19(火) [#a9bb8726] -以下のコマンドでインストール。 brew install mysql -MySQL 8がインストールされる。 -以下の情報が表示される。 #pre{{ ==> Caveats We've installed your MySQL database without a root password. To secure it run: mysql_secure_installation MySQL is configured to only allow connections from localhost by default To connect run: mysql -uroot To restart mysql after an upgrade: brew services restart mysql Or, if you don't want/need a background service you can just run: /opt/homebrew/opt/mysql/bin/mysqld_safe --datadir=/opt/homebrew/var/mysql ==> Summary 🍺 /opt/homebrew/Cellar/mysql/8.0.28_1: 304 files, 294.3MB ==> Running `brew cleanup mysql`... Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`). ==> Caveats ==> mysql We've installed your MySQL database without a root password. To secure it run: mysql_secure_installation MySQL is configured to only allow connections from localhost by default To connect run: mysql -uroot To restart mysql after an upgrade: brew services restart mysql Or, if you don't want/need a background service you can just run: /opt/homebrew/opt/mysql/bin/mysqld_safe --datadir=/opt/homebrew/var/mysql }} -/opt/homebrew/etc/my.cnfがある。 -サーバーを実行(これをしないとmysql_secure_installationが実行できない)。 brew services restart mysql -以下のコマンドを実行して初回セットアップ実行(homeの.my.cnfはリネームしておく) mysql_secure_installation -とりあえず「VALIDATE PASSWORD COMPONENT」は無効。rootのパスワードを設定。