SELECT command denied to user

来源:互联网 发布:高音唱不上去 知乎 编辑:程序博客网 时间:2024/05/16 14:59

 

root cause

org.hibernate.exception.SQLGrammarException: could not execute query

************

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: SELECT command denied to user 'databasename'@'127.0.0.1' for table

原因与解决:

    因为Hibernate Tools(或者Eclipse本身的Database Explorer)生成*.hbn.xml工具中包含有catalog="databasename"(*表示数据库名称)这样的属性,将该属性删除就可以了.

原创粉丝点击