(참고)DJANGO 프로젝트 3 (03. MYSQL 설치 및 설정하기)

MYSQL




01. mysql 설치

brew update
brew install mysql

02. 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!

03. mysql 접속

mysql -uroot -p
password : 1234

mysql>
# 현재 세팅 값 확인
mysql>status 
# mysql 종료
mysql> exit
# mysql.server 종료
mysql.server stop

좋은 웹페이지 즐겨찾기