본문 바로가기

쓰기

ERROR 1044 (42000): Access denied for user

haru 2018.02.06 17:51 조회 수 : 259

해당작업은 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을 재시작을하여 정상접근해서 권한을 주면 정상적으로 되는것을 알수있을것이다!

번호 제목 글쓴이 날짜 조회 수
36 You Are Able To Mount An Effective Online Marketing Marketing Campaign new MilanBlackett8711 2018.04.26 0
35 Tired Of Struggling Monetarily? Find Out How To Earn Money On-line! new MargeneLoveless4146 2018.04.26 2
34 How To Develop Your Small Business With Article Marketing new MatthewGabbard757831 2018.04.26 2
33 Enhance Your Online Marketing With These Great Tips! new YLUEric2570262232 2018.04.26 0
32 Exceptional Recommendations On Search Engine Marketing That Are Easy To Stick To new MarlysKearney654 2018.04.26 0
31 Want A Lot More Website Visitors? What You Must Know new BrittO724056517454334 2018.04.26 0
30 Beginner In Search Engine Optimisation? Try Out The Following Tips! new AmieHindmarsh0943 2018.04.26 0
29 Virtually No Time To Examine About Generating An Income Online? Just Check This Out Article new MerlinColdham7370 2018.04.26 1
28 Ways To Get Your Web Site Ranked Higher With Search Engine Marketing new ThomasDias8909423 2018.04.26 0
27 Internet Marketing Do's And Don'ts, Obtaining The Best From Your Time And Effort new MarkHindley862213597 2018.04.26 2
26 Do You Know About Search Engine Optimisation? You Could Get More Visitors On The Website. new Indira25S403025125502 2018.04.26 0
25 Quit The Commute: Tips And Tricks For Having A Home-based Business new RaymundoParnell734 2018.04.26 0
24 Follow These Simple And Valuable Article Writing Ideas new MinervaCawthorne482 2018.04.26 0
23 세그멘테이션 오류 haru 2018.03.08 18
» ERROR 1044 (42000): Access denied for user haru 2018.02.06 259
21 db table 엔진확인 및 변경 haru 2017.11.28 66
20 mysql 프로세스에서 unauthenticated user 확인시 haru 2017.11.28 6
19 mysql 프로세스 실시간으로 확인하기 haru 2017.11.28 12
18 mysql 4.1 db생성및권한 haru 2017.11.28 5
17 mysql 정보확인 명령어 haru 2017.11.28 9