DB/MySQL
MySQL - 계정 비밀번호 변경
rkatk1523
2021. 1. 29. 15:27
비밀번호 변경
// mysql 접속
mysql -u root -p
// mysql 데이터베이스 이동
use mysql;
// mysql 5
update user set password=password('변경할 비밀번호') where user='변경할 아이디';
// mysql 8
alter user '변경할 아이디'@'localhost' identified with mysql_native_password by '비밀번호';
// 현재 사용중인 MySql의 캐시를 지우고 새로운 설정을 저장
flush privileges;
728x90