728x90
반응형
1. root 계정 로그인
$ mysql -u root -p
2. 사용자 정보가 포함된 'mysql' DB 사용
use mysql;
3. 버전 별 password 변경 쿼리 적용
# 5.6 이하
> update user set password=password('new password') where user = 'root';
# 5.7 이상
> update user set authentication_string=password('new password') where user = 'root';
# 8.x 이상
> alter user 'root'@'localhost' identified with mysql_native_password by 'new password';
4. 변경사항 적용
> flush privileges;
728x90
반응형
'DataBase > MySQL' 카테고리의 다른 글
AWS EC2에 MySQL Local 적용해보기 (0) | 2023.03.16 |
---|