[mysql] error 1045 (28000)

by illyf posted Oct 26, 2008
?

단축키

Prev이전 문서

Next다음 문서

ESC닫기

크게 작게 위로 아래로 댓글로 가기 인쇄
Extra Form
mysql 비번을 설정하려고 할때...

[linuxbox.localhost ~]# mysql -u root -p
Enter password:
ERROR 1045 (28000): Access denied for user ‘root’@'localhost’ (using password: YES)

이런 에러가 날경우..

[linuxbox.localhost ~]# /etc/init.d/mysqld stop

[linuxbox.localhost ~]# mysqld_safe --skip-grant-tables &

[linuxbox.localhost ~]# mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.0.22

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql> UPDATE mysql.user SET password="" WHERE User='root' AND Host='localhost';
Query OK, 1 row affected (0.02 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> quit
Bye

[linuxbox.localhost ~]# ps ax | grep mysql

[linuxbox.localhost ~]# kill -9 .........

[linuxbox.localhost ~]# /etc/init.d/mysqld-max start

[linuxbox.localhost ~]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 5.0.22

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

mysql> quit
Bye

[linuxbox.localhost ~]# _

성공하길 바랍니다.

Articles

4 5 6 7 8 9 10 11 12 13