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 ~]# _
성공하길 바랍니다.
[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 ~]# _
성공하길 바랍니다.