您的位置:首页 > 其它

1045-Acess denied for user:'root'@'192.100.1.243'(Using password:YES)

2016-01-16 17:29 543 查看
Navicat连接mysql时报错:
1045-Acess denied for user:'root'@'192.100.1.243'(Using password:YES)

解决办法:
login as: root
root@192.168.0.192's password:
Last failed login: Sat Jan 16 16:51:04 CST2016 from 192.168.198.109 on ssh:notty
There were 8 failed login attempts sincethe last successful login.
Last login: Sat Jan 16 16:07:40 2016
[root@NeoKylin-CNVL ~]# mysql -uroot
ERROR 1045 (28000): Access denied for user'root'@'localhost' (using password: NO)
[root@NeoKylin-CNVL ~]# mysql -uroot -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 15
Server version: 5.6.25 MySQL CommunityServer (GPL)

Copyright (c) 2000, 2015, Oracle and/or itsaffiliates. All rights reserved.

Oracle is a registered trademark of OracleCorporation and/or its
affiliates. Other names may be trademarksof their respective
owners.

Type 'help;' or '\h' for help. Type '\c' toclear the current input statement.

给予授权
mysql> grant all on *.* to root@"%"identified by "root";
Query OK, 0 rows affected (0.00 sec)

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

mysql> exit
Bye

重新启动mysql
[root@NeoKylin-CNVL ~]# /etc/init.d/mysqlrestart
Shutting down MySQL.. [ 确定 ]
Starting MySQL.... [ 确定 ]
[root@NeoKylin-CNVL ~]#

测试连接正常,如图所示:


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  1045-Acess denied fo