



brew update
brew install mysql
mysql.server start
mysql_secure_installation
# yes는 복잡한 비밀번호, no는 간단한 비밀번호 설정
Press y|Y for Yes, any other key for No : no
New password : 1234
# 사용자 설정 : yes를 하면 roo 옵션이 있고 no를 하면 -u라는 옵션이 있다
Remove anoymouse user? yes
# 원격 접속 허용, Yes는 거부, no는 허용
Disallow root login remotely? yes
# 테스트 데이터 베이스에 대한 것으로 yes를 하면 테스트데이터베이스 삭제, no를 하면 유지
Remove test database and access to it? yes
# 변경된 권한을 테이블에 적용 설정, yes는 적용, no는 미적용
Reload privilege tables now? yes
All done!
mysql -uroot -p
password : 1234
mysql>
# 현재 세팅 값 확인
mysql>status
# mysql 종료
mysql> exit
# mysql.server 종료
mysql.server stop