mysqld-nt --skip-grant-tables --user=root
เปิด อีก cmd.exe
C:\Users\user>mysql -u root
Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 2Server version: 5.0.45-community-nt-log MySQL Community Edition (GPL)Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> use mysql
Database changed
mysql> update user set PASSWORD=PASSWORD('aa') where user='root';
Query OK, 0 rows affected (0.00 sec)Rows matched: 1 Changed: 0 Warnings: 0
mysql> flush privileges ;
Query OK, 0 rows affected (0.02 sec)
mysql> quit
Bye
C:\Users\user>mysql -u root -p
Enter password: **
Welcome to the MySQL monitor.
Commands end with ; or \g.Your MySQL connection id is 3Server version: 5.0.45-community-nt-log MySQL Community Edition (GPL)Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
Close mysql-nt.exe ( first window ) by
C:\Users\user>mysqladmin shutdown -u root -p
Enter password: **
C:\Users\user>
No comments:
Post a Comment