ERROR 1044 (42000): Access denied for user > Mysql

본문 바로가기

사이트 내 전체검색

뒤로가기 Mysql

ERROR 1044 (42000): Access denied for user

페이지 정보

작성자 HARULIFE 작성일 20-11-24 11:57 조회 38,708 댓글 0

본문

해당작업은 mysql4.1버전에서 mysql 5.1로 올릴시 문제되었던 상황이다.

아래와같이

mysql> insert into user(host,user,password) values('localhost','harulife',password('비밀번호'));

Query OK, 1 row affected, 3 warnings (0.00 sec)

 

새롭게 유저를 등록하는부분에서는 성공을했다... 그런데...!!

 

mysql> grant all privileges on harulife.* to 'harulife'@'localhost' identified by '비밀번호';

ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'harulife'

위와같이 권한을 주려하는데 오류메세지가 등장했다.

위 오류를 해결하기위해 --skip-grant-tables 에서 'root'@'localhost' 에 권한을줘라 라고나오는데...!!

 

mysql> grant all privileges on *.* to 'root'@'localhost' with grant option;

ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement

 

위와같이 오류메세지가 나온다 위와같이 나온다면

--skip-grant-tables 로 접속한상황에서

 

mysql> flush privileges;

Query OK, 0 rows affected (0.00 sec)

 

위 명령어를 쳐준뒤 다시한번더 권한을 줘본다.

mysql> grant all privileges on *.* to 'root'@'localhost' identified by '비밀번호' with grant option;

Query OK, 0 rows affected (0.00 sec)

 

성공했다 !!!!

 

그럼 다시 mysql을 재시작을하여 정상접근해서 권한을 주면 정상적으로 되는것을 알수있을것이다!

댓글목록 0

등록된 댓글이 없습니다.

Copyright © 소유하신 도메인. All rights reserved.

사이트 정보

회사명 : 회사명 / 대표 : 대표자명
주소 : OO도 OO시 OO구 OO동 123-45
사업자 등록번호 : 123-45-67890
전화 : 02-123-4567 팩스 : 02-123-4568
통신판매업신고번호 : 제 OO구 - 123호
개인정보관리책임자 : 정보책임자명

PC 버전으로 보기