ไม่ได้ใช้ซะนาน ลืม Password จนได้ แต่ถึงลืมก็สามารถแก้ไขจนได้ ;P
debian:/#killall mysqld
debian:/#/usr/libexec/mysqld -Sg --user=root &
debian:/#mysql
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 1 to server version: 3.23.41
Type 'help;' or 'h' for help. Type 'c' to clear the buffer.
mysql> USE mysql
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> UPDATE user
-> SET password=password("newpassword")
-> WHERE user="root";
Query OK, 2 rows affected (0.04 sec)
Rows matched: 2 Changed: 2 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.01 sec)
mysql> exit;
debian:/#killall mysqld
Start Mysql
/etc/init.d/mysqld start |
ใช้ได้แล้ว : )
posted by compman
, at 23:36:22