0
0

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.

MySQLインストール備忘録 macOS

Posted at

MySQLインストールやってみます。

Homebrewがインストールされているか確認します

入力
brew -v
結果
Homebrew 4.0.9
Homebrew/homebrew-core (git revision d8c9940ad94; last commit 2023-03-25)
Homebrew/homebrew-cask (git revision b036a0f836; last commit 2023-03-24)

問題なさそうなので、MySQLのインストール準備をします。

入力
mysql --version
結果
command not found: mysql

インストールされていないことを確認しましたので、早速インストール実施します。

入力
brew install 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 -u root

To start mysql now and restart at login:
  brew services start mysql

うまくいきました!

それではサービスを開始してみます。事前にパスワードの設定は完了しています。

brew services start mysql
mysql --user=root --password
mysql> 

うまくいきました!

稼働確認が完了したので、ログアウトしサーバーを停止したいと思います。

exit
Bye
brew services stop mysql
Stopping `mysql`... (might take a while)
==> Successfully stopped `mysql` (label: homebrew.mxcl.mysql)

とりあえず、インストール&稼働確認完了しました。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?