728x90
나의 경우는 디비버로 mysql을 접속할 때 발생하였다.

서버에 접근 권한이 없어서 발생하는 에러로 직접 권한을 부여해주자!

MySQL을 설치하면 자동으로 Install된 커맨드 라인을 사용하여 명령어를 입력해주었다.
GRANT ALL PRIVILEGES ON *.* TO root@'%';
(root 계정에 접근권한 줌)

그러나 위와 같이 권한 위임 에러가 발생하였다.
create user 'tttt'@'%' identified by 'tttt';
새로 계정 만들어줌
grant all privileges on *.* to root@locahost;
해당 계정에서 root에 권한 줌
근데도 에러가 났다
그래서 기존 계정을 해봤다
SELECT host, user, plugin FROM mysql.user;

비밀번호가 mysql native password가 아니라 caching sha2 암호화된 패스워드임
(위 사진은 내가 멍청하게 바꾸고 캡쳐함.. 원래는 caching_sha2 비번이었음)
ALTER USER 'tttt'@'localhost' IDENTIFIED WITH mysql_native_password BY 'tttt';
바꿔주면 해결된다.
'WEB' 카테고리의 다른 글
| [PostgreSQL] PostgreSQL UPSERT 알아보기 (0) | 2025.02.17 |
|---|---|
| [Video.js] 동영상 재생 API (0) | 2024.06.05 |
| [WEB] - 클라이언트 IP 헤더 정보 가져오기 (X-Forwarded-For) (0) | 2024.03.13 |
| [Error] cvc-elt.1.a: Cannot find the declaration of element 'web-app'. (0) | 2024.02.29 |
| [Error] Exception java.lang.ExceptionInInitializerError: Cannot access defaults field of Properties [in thread "Worker-48: Building workspace"] (0) | 2024.02.27 |