본문 바로가기
Database/mysql

[mysql] 버전에 따른 패스워드 변경

by 평범한kiki 2023. 4. 21.

1. MYSQL 버전확인

SELECT VERSION();

2. 패스워드 변경시

- MYSQL 5.6 설정

update mysql.user set Password=Password('insight') where User='insight' and  host='%';
#update mysql.user set password = password('패스워드') where user = 'root';
commit;
FLUSH PRIVILEGES;

- MYSQL 5.7 설정

ALTER USER 'insight'@'%' IDENTIFIED WITH mysql_native_password BY 'Insight&567';
commit;
FLUSH PRIVILEGES;