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 ~]#

 

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

wKioL1aaDUvzq1s6AAJ4lYq-W1c162.jpg