程序在连接远程 mysql服务器时出错 java.sql.SQLException: Access denied for user 'root'@'192.168.27.129' (using password: YES)

本机IP为'192.168.27.129'

进入mysql命令行:

MySQL>use mysql;

MySQL>select host,user from user;

查看得信息如下,也没有限制不让本机连接mysql呢。

+-----------------------+------+
| host                  | user |
+-----------------------+------+
| %                     | root |
| 127.0.0.1             | root |
| ::1                   | root |
| localhost             | root |
| localhost.localdomain | root |
+-----------------------+------+

难道是默认不让root远程登陆??

MySQL>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'xuxu' WITH GRANT OPTION

予任何主机访问数据的权限

3、MySQL>FLUSH PRIVILEGES

程序再用root和密码 ,登录,结果成功!

java.sql.SQLException: Access denied for user 'root'的更多相关文章

  1. java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)

    在更新项目之后,做了一定的改动后发现竟然报错了,刚才还好好的. java.sql.SQLException: Access denied for user 'root'@'localhost' (us ...

  2. 技术笔记1:java.sql.SQLException: Access denied for user 'root'@'localhost' (using password)

    在myEclipse10中运行java项目的时候,遇到java.sql.SQLException: Access denied for user 'root'@'localhost' (using p ...

  3. java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES) 解决办法

    一.背景 在Spark中,将DStream写入到MySQL出现错误:java.sql.SQLException: Access denied for user 'root'@'localhost' ( ...

  4. [Spring MVC - 2A] - java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

    严重: Servlet.service() for servlet [springMVC] in context with path [/ExceptionManageSystem] threw ex ...

  5. MySQL java连接被拒绝:java.sql.SQLException: Access denied for user 'root'@'****' (using password: YES)

    //系统运行出现错误:java.sql.SQLException: Access denied for user 'root'@'***.**.**.**' (using password: YES) ...

  6. 数据库异常 :java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)

    最近在新项目中突然出现了  java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES) ...

  7. java.sql.SQLException: Access denied for user 'root'@'10.1.0.2' (using password: YES)

    java.sql.SQLException: Access denied for user 'root'@'10.1.0.2' (using password: YES) at com.mysql.c ...

  8. java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)解决方案

    java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES) at com.mysql. ...

  9. java.sql.SQLException: Access denied for user 'root'@'10.10.7.180' (using password: YES)

    1.刚开始连接数据库提示是: java.sql.SQLException: Access denied for user 'root'@'10.10.7.180' (using password: N ...

随机推荐

  1. Env:Cscope安装与配置

    1. 介绍 Cscope是类似于ctags一样的工具,但可认为他是ctags的增强版. 2. 安装 sudo apt-get install cscope 通过源码安装,参照http://blog.c ...

  2. 【Mongodb】3.0 配置身份验证db.createUser()说明

    原文地址:http://bbs.51cto.com/thread-1146654-1.html 定义: 创建一个数据库新用户用db.createUser()方法,如果用户存在则返回一个用户重复错误. ...

  3. sql server 2012 如何收缩事务日志

    sql2008不再支持 BACKUP LOG 数据库名 WITH NO_LOG   语句 BACKUP Log zxta with no_log 截断事务日志 sql2008 提示错误如下 BACKU ...

  4. (C# Debug)A first chance exception of type 'System.ArgumentException' occurred in System.Data.dll

    Debug 模式下运行程序的时候,Output 窗口出来个错误“A first chance exception of type 'System.ArgumentException' occurred ...

  5. ERP_Oracle Erp 11i 和 R12的区别概述(概念)

    2014-06-26 Created By BaoXinjian

  6. Oracle11G登录时提示:ORA-12557: TNS:协议适配器不可加载

    原文 Oracle11G登录时提示:ORA-12557: TNS:协议适配器不可加载 初步分析是ORACLE_HOME设置错误引起的.前几天不小心看到系统环境变量中的其值为空,就手贱的加载了一个ora ...

  7. dos查看端口

    C:\Documents and Settings\Administrator>netstat -an | findstr "22"  TCP    192.168.16.2 ...

  8. 为什么选择 Yeoman 及 Yeoman 的安装

    今天向您介绍一个我刚接触到的比较新的网络前端开发工具: Yeoman . 什么是Yeoman? Yeoman是Google的团队和外部贡献者团队合作开发的一个项目.通过内部三个工具(yo,grunt, ...

  9. How to control PrincipalObjectAccess table growth in Microsoft Dynamics CRM 2011

    https://support.microsoft.com/en-us/kb/2664150 How to control PrincipalObjectAccess table growth in ...

  10. DataTable.select() 返回 DataTable

    DataTable.select() 默认返回值为 DataRow[]数组 代码来自网络: /**/ /// <summary> /// 执行DataTable中的查询返回新的DataTa ...