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"(*表示数据库名称)这样的属性,将该属性删除就可以了.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)