我已经了解到hibernate.hbm2ddl.auto创建Schema并执行其他各种操作。但在我的情况下,它不创建模式。我在我的本地主机上使用 MYSQL。它没有名为hibernate 的模式。我尝试了各种其他的东西,但仍然得到相同的Error。
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'hibernate'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
Run Code Online (Sandbox Code Playgroud)
完全错误
Aug 06, 2018 5:31:48 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {5.2.12.Final}
Aug 06, 2018 5:31:48 PM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
Aug 06, 2018 5:31:49 PM org.hibernate.annotations.common.reflection.java.JavaReflectionManager <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
Aug 06, 2018 5:31:49 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
WARN: HHH10001002: Using Hibernate built-in connection pool (not for production use!)
Aug 06, 2018 5:31:49 …Run Code Online (Sandbox Code Playgroud)