【发布时间】:2016-10-14 15:19:54
【问题描述】:
我的数据库名称是:
test
我给了:
grant all on test.* to 'me' identified by 'foolinGAround_8-'
当我尝试通过 jdbc 连接时,我得到了
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: 用户'me'@'%' 拒绝访问数据库'test/'
是什么原因,如何解决?
【问题讨论】:
-
select user,host from mysql.user where user='me' -
对不起 Drew 先生,我是 sql 和 java 新手,我无法理解您的回答,请见谅。
-
你能详细说明一下,这样对我有帮助吗
-
您的用户没有远程访问权限。使用
grant all on test.* to 'me'@'%' identified by 'foolinGAround_8-' -
不,我仍然得到相同的 sql 异常,Leon 先生
标签: java mysql sql jdbc database-connection