MySQL 루트 비밀번호 설정 오류 해결방법

MySQL은 가장 많이 쓰이는 관계형 데이터베이스 관리 시스템 입니다. 다양한 운영체제에서 웹 어플리케이션을 가동할 때 쓰이죠. 오늘은 우분투에서 MySQL 루트 비밀번호 설정 오류 해결방법에 대해서 알아보도록 하겠습니다.

MySQL 루트 비밀번호 설정 오류 해결방법 썸네일

MySQL 루트 비밀번호 설정 오류 해결법

… Failed! error: SET PASSWORD has no significance for user ‘root’@’localhost’ as the authentication method used doesn’t store authentication data in the MySQL server. Please consider using ALTER USER instead if you want to change authentication parameters.

1 mysql 비밀번호 설정 오류

Ubuntu에서 mysql secure installation 로 root 비밀번호 설정할 때 위와 같은 문구가 뜨면서 비밀번호가 설정이 되지 않는 경우가 종종 있었습니다. 제 경우는 터미널을 너무 오래켜놓고 다음 작업을 이어가다가 생긴 것 같습니다. New password를 입력해도 계속 오류문구가 뜨면서 계속 비밀번호를 입력하라고 하는 무한 오류가 발생합니다. 해결 방법은 다음과 같습니다.

2 MySQL monitor 접속

1. 터미널창을 끄고 다시 sudo su → sudo mysql 을 입력해 MySQL monitor에 들어갑니다.

3 mysql 접속 비밀번호 설정

2. ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password by ‘비번’; 를 입력합니다.

‘비번’란에 개인 비밀번호를 입력합니다. 오류 없이 성공했다면 Query OK 문구가 출력됩니다. exit 를 입력해 mysql 모니터링 화면에서 나옵니다.

4 다시 mysql_secure_installation 으로 비밀번호 설정

3. sudo mysql_secure_installation 을 입력합니다. root 비밀번호를 입력해주세요.

5 비밀번호 변경완료 후 n 입력

4. 접속하면 Change the password for root ? 라고 물어봅니다. N을 입력하세요.

(여기서 Y를 입력해버리면 처음부터 다시해야합니다. 계속 오류납니다..)

6. 남은 물음에 전부 y 입력 All done

5. 이제 남은 4번의 물음에서 전부 y를 입력해주면 All done!

Leave a Comment

For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

I agree to these terms.

error: Content is protected !!