본문 바로가기

Mac MySQL 설치하기

mac 2020. 8. 8.

반응형

Homebrew 설치하기

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

 

 

MySQL 설치하기

brew install mysql

 

 

MySQL 서버 실행

# To have launchd start mysql now and restart at login:
brew services start mysql



# Or, if you don't want/need a background service you can just run:
mysql.server start

 

 

설정하기

mysql_secure_installation

1. 복잡한 비밀번호로 설정?

Would you like to setup VALIDATE PASSWORD component?

= no

 

 

2. 비밀번호 설정

Would you like to setup VALIDATE PASSWORD component?

1) New password: 비밀번호 설정하기

2) Re-enter new password: 비밀번호 재입력하기

 

 

3. 익명의 사용자

Remove anonymous users? (Press y|Y for Yes, any other key for No) :

= yes

 

 

4. 원격접속

Disallow root login remotely? (Press y|Y for Yes, any other key for No) :

= yes

 

 

5. test Database

Remove test database and access to it?

= yes

 

 

6. 변경된 권한 테이블에 적용

Reload privilege tables now? 

= yes

 

 

All done! 이 나오고 끝


MySQL 실행하기

mysql -uroot -p

비밀번호 입력 후 접속 확인하면 끝

 

728x90

Comments