首页 > 其他 > 详细

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

时间:2016-01-16 19:34:24      阅读:1776      评论:0      收藏:0      [点我收藏+]

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)

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!