디버그 노트
MySQL) ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement. 에러해결
Henry95
2020. 8. 6. 19:30
반응형
mysql을 재설치 할 일이 있어서 재설치를 한 후 부여받은 초기비밀번호를 나의 비밀번호로 바꾸고자 다음과 같은 명령어로 업데이트 시도를 했다. 그러나 아래와 같은 에러가 뜨면서 업데이트가 거부 되었고 구글링을 통해 답을 알아내었다.
시도한 명령어
UPDATE mysql.user SET authentication_string='password' WHERE user='root@localhost';
ALTER USER root identified by 'password'
결과
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
해결한 명령어
SET password = password('password')
반응형