jdbc SQLException:'Access denied for user 'myuser'@'36.248.247.251' (using password: YES)'缘由及解决

      此问题的缘由有三种:sql

        1.权限不足数据库

        2.帐号密码错误框架

        3.本地数据库中有用户名为空的用户ide

      若是是权限不足,经过cmd或sqldeveloper以管理员即root用户登录数据库,执行grant all privileges on *.* to root@'%' identified by ’*******‘;语句。其中*号是密码。而后执行:flush privileges刷新权限。
spa

      若是是帐号或密码错误,看看数据驱动是否写错,若是是用ssm等框架的看看properties文件里用户名或密码后面用没有多空格。blog

     不然,登录数据库,查询是否有用户名为空的用户。cmd

      select user,password from user where user=' ';string

      如有记录,则删除之:it

      delete from user where user=' ';class

      commit;

相关文章
相关标签/搜索