Databases/SQL
맥에서 mysql 다운받는 법(Monterey OS)
CodeMia
2022. 1. 5. 05:37
1. homebrew를 다운 받는다.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
2. homebrew repository를 업데이트 한다.
brew update
3. brew를 이용해서 mysql을 다운받는다.
brew install mysql
brew services start mysql
4. 비밀번호를 설정해준다.
mysql_secure_installation
5. mysql을 시작한다.
mysql -u root -p
비밀번호를 입력하라고 나오는데 비밀번호를 입력한다.
mysql로 터미널 내용이 바뀌면 성공
6. mysql을 끝낸다.
\q
quit
둘 중에 아무거나 입력한다.
-- 출처 --
https://postsrc.com/code-snippets/how-to-install-mysql-on-macos-monterey