第一步:C:\Program Files (x86)\MySQL\bin>net stop mysql
mysql 服务正在停止.
mysql 服务已成功停止。
第二步:
mysql>C:\Program Files (x86)\MySQL\bin>mysqld --skip-grant-tables
第三步:
C:\Program Files (x86)\MySQL\bin>net start mysql
mysql 服务正在启动 ..
mysql 服务已经启动成功。
第四步:
C:\Program Files (x86)\MySQL\bin>mysql -u root mysql
Welcome to the MySQL monitor. Commands end with ; or \g.Your MySQL connection id is 1
Server version: 5.5.38 MySQL Community Server (GPL)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
第五步:
Query OK, 3 rows affected (0.07 sec)
Rows matched: 3 Changed: 3 Warnings: 0
第六步:
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.01 sec)
第七步:
mysql> quit
Bye
第八步:
C:\Program Files (x86)\MySQL\bin> net start mysql
请求的服务已经启动。
第九步:
C:\Program Files (x86)\\MySQL\bin> mysql -u root -p
Enter password: ****
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.5.38 MySQL Community Server (GPL)
Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement
mysql>