程序在连接远程 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. ASP.NET内置对象详解

    ASP.NET的内置对象介绍 1.Response 2.Request 3.Server 4.Application 5.Session 6.Cookie Request对象主要是让服务器取得客户端浏 ...

  2. C# Winform中WndProc 函数作用

    http://blog.csdn.net/xochenlin/article/details/4328954 C# Winform中WndProc 函数作用: 主要用在拦截并处理系统消息和自定义消息 ...

  3. de.greenrobot.event.EventBusException: Subscriber class dji.midware.a.e already registered to event class

    java.lang.RuntimeException: Unable to create application com.android.tools.fd.runtime.BootstrapAppli ...

  4. 配置cwrsync实现windows2008和centos7文件定时同步

    一.准备 二.安装 1.安装cwRsyncServer_4.0.5_Installer.exe 安装过程中提示创建用于windows服务的windows用户名,需要注意的是密码一定要它自己生成的密码的 ...

  5. hadoop源代码解读

    http://blog.csdn.net/keda8997110/article/details/8474349

  6. C语言中,数组名作为参数传递给函数时,退化为指针

    C语言中,数组名作为参数传递给函数时,退化为指针   C语言中,数组名作为参数传递给函数时,退化为指针:需要数组大小时, 需要一个参数传数组名,另一个传数组大小. 数组名做函数参数时,就相当于指针了. ...

  7. 第4章 管道和FIFO

    4.1 管道 管道是由pipe函数创建的,提供一个单向数据流. 头文件 #include <unistd.h> 函数原型 int pipe(int fd[2]); 返回值 成功则为0,出错 ...

  8. struts2 使用注解方式配置

    1.导入convention 包 2.java: package com.struts.base.hello; import java.io.IOException; import java.io.P ...

  9. 回朔法/KMP算法-查找字符串

    回朔法:在字符串查找的时候最容易想到的是暴力查找,也就是回朔法.其思路是将要寻找的串的每个字符取出,然后按顺序在源串中查找,如果找到则返回true,否则源串索引向后移动一位,再重复查找,直到找到返回t ...

  10. String Format for DateTime

    This example shows how to format DateTime using String.Format method. All formatting can be done als ...