Mysql 5.6 에 비해 Mysql 5.7은 비번변경 방법이 조금 바뀜.
먼저 서버 스타트 (필자의 환경은 맥에 brew로 설치한 경우)
1 |
mysql.server start |
기존 비번으로 로그인 (없을 경우 그냥 mysql -u root)
1 |
mysql -u root -p |
mysql 데이터베이스에 root 유저 비번 변경 후 권한 flush
1 2 3 4 5 6 |
use mysql; update user set authentication_string=password('YOURSUPERSECRETPASSWORD') where user='root'; flush privileges; quit |
서버 재시작
1 |
mysql.server restart |
이렇게 하면 비밀번호 잘 바뀐다.