0
0

(mac) Homebrewによるmysql8.0インストールからログインまで

Last updated at Posted at 2024-09-14

Homebrewがインストールされていることを確認

brew -v

mysql8.0がインストール可能か確認

brew search mysql

mysql8.0をインストール

brew install mysql  // こちらもインストールする必要がある?
brew install mysql@8.0

mysql8.0がインストールできたか確認

brew list | grep mysql

mysql8.0サーバーを起動

brew services start mysql@8.0

mysql8.0サーバーが起動されていることを確認

brew services list

(mysql8.0サーバーをストップする場合は下記)

brew services stop mysql@8.0

Homebrewによるインストールだとrootユーザーにパスワードが設定されていないので、パスワードを設定する。

mysql_secure_installation

設定したら下記実行後、パスワード入力してログイン

mysql -u root -p

(ログアウトする場合は下記)

exit
0
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
0
0