MySQL 5.5 正确配置 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: Y ES)
2017-08-09 16:28
501 查看
第一步: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.
第五步:
mysql> UPDATE user SET Password=PASSWORD('root') where USER='root';
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>
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.
第五步:
mysql> UPDATE user SET Password=PASSWORD('root') where USER='root';
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>
相关文章推荐
- 第一次配置mysql是出现错误:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
- centos 6.5 连接MySQL 提示:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password:
- mysql登录账号出错:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
- MySQL登录 ERROR 1045 (28000) Access denied for user 'root'@'localhost' (using password NO)问题
- mysql提示ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
- Mac使用mysql报Mac ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)错误
- mysql报ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password)错误或者远程用户不能登录
- mysql登录账号出错:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
- CentOS 7.4下解决登录MySQL时,ERROR 1045 (28000): Access denied for user root@localhost (using password: YES
- ubuntu mysql问题 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YSE)解决
- MySQL 报错 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) 的解决办法
- mysql登录账号出错:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
- ubuntu 系统解决mysql连接问题(ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password:
- CentOS 命令登录MySQL时,报错 ERROR 1045 (28000): Access denied for user root@localhost (using password: NO)
- mysql登录账号出错:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
- mysql解决ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
- mysql 错误解决 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
- mysql登录账号出错:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
- centOS下mysql-ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
- ubuntu 系统解决mysql连接问题(ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: