Showing posts from April 20, 2008

reset password mysql root

Lupa password mysql nih caranya ..........

dev includes # /etc/init.d/mysqld stop
Stopping MySQL: [ OK ]
dev includes # mysqld_safe --skip-grant-tables
Starting mysqld daemon with databases from /var/lib/mysql

mysql --user=root mysql

[1]+ Stopped mysqld_safe --skip-grant-tables
dev includes # mysqld_safe
A mysqld process already exists

dev includes # mysql --user=root mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.1.20

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

mysql> update user set Password=PASSWORD('root');
Query OK, 6 rows affected (0.02 sec)
Rows matched: 6 Changed: 6 Warnings: 0

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> exit
dev includes # ps x