码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2016-01-16 19:35:32      阅读:353      评论:0      收藏:0      [点我收藏+]

标签:1045-acess denied for user:'root'@'192.100.1.243'(using password:yes)

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

 

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

技术分享

本文出自 “DOSOM” 博客,谢绝转载!

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

标签:1045-acess denied for user:'root'@'192.100.1.243'(using password:yes)

原文地址:http://8656934.blog.51cto.com/8646934/1735598

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!