在您刚开始使用Hibernate时,终于要推出的web APP应用程序出现了“无法连接到MySQL -主机不允许”错误
2012-nov-1412336054336023 org.hibernate.tool.hbm2DDL.schema export execute
error : hhh 000231: schema export unsuccessful
java.sql.SQLException: null,messagefromserver : ' host ' 192.168.1.7 ' isnotallowedto
连接到MySQL server '
这真的很令人失望。 为什么我不是本地主机? 什么是192.168.1.7? 我可以给你类似问题答案的权限,但为什么我不是本地主机?
我理解这里的问题。 由于hbm2ddl设置已配置为创建,因此您希望创建指定的表,但未从MySQL服务器获得许可证。
我在Eclipse中开发struts2/hibernate APP应用程序。 用Tomcat。 当然还有MYSQL。
在此先谢谢你!
编辑: (在hibernate.cfg.xml中)
/p
'-//hibernate/hibernateconfigurationdtd//en '
' http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd '
com.mysql.jdbc.Driver
JDBC : MySQL ://localhost :3306/clothes
路线
路线
1
org.hibernate.dialect.MySQL dialect
true
创建
2012-11-14
约翰s