ERROR 1044 (42000): Access denied for user
페이지 정보
작성자 HARULIFE 작성일 20-11-24 11:57 조회 24,435 댓글 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을 재시작을하여 정상접근해서 권한을 주면 정상적으로 되는것을 알수있을것이다!
아래와같이
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
등록된 댓글이 없습니다.