陈建华的博客
专注web开发
SELECT command denied to user
2014-07-08 16:18:12   阅读2397次

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"(*表示数据库名称)这样的属性,将该属性删除就可以了




-----------------------------------------------------
转载请注明来源此处
原地址:#

-----网友评论----
暂无评论
-----发表评论----
微网聚博客乐园 ©2014 blog.mn886.net 鲁ICP备14012923号   网站导航