mysql 설치
mysql 부터 설치
brew install mysql
버전확인
mysql -V.
서버 실행
mysql.server start.
정상실행되었으면 초기설정
mysql_secure_installation
비밀번호 복잡 >yes 비밀번호 단순 > no Press y|Y for Yes, any other key for No: No
MYSQL 기본 설정 익명유저 Remove anonymous users? (Press y|Y for Yes, any other key for No) : Yes
root 접속 권한 Disallow root login remotely? (Press y|Y for Yes, any other key for No) :y
test database 삭제 유무 Reload privilege tables now? (Press y|Y for Yes, any other key for No) : yes 초기설정이 완료 됨. 언제든지 명령어를 사용해 다시 설정 가능
접속
mysql -u root -p
종료
mysql> exit
서버종료
mysql.server stop
실행//
mysql.server start.
추가적으로 mysql server가 재부팅과 상관없이 켜져있을 수 있도록 brew services로 가능
$ brew services start mysql
Leave a comment