hibernate 不能自动连接数据库创建表

2016-05-17 10:54:24,536 INFO (Version.java:54) - HHH000412: Hibernate Core {4.3.10.Final}
2016-05-17 10:54:24,545 INFO (Environment.java:239) - HHH000206: hibernate.properties not found
2016-05-17 10:54:24,551 INFO (Environment.java:346) - HHH000021: Bytecode provider name : javassist
2016-05-17 10:54:25,510 WARN (JdbcServicesImpl.java:204) - HHH000342: Could not obtain connection to query metadata : Cannot create PoolableConnectionFactory (Table 'performance_schema.session_variables' doesn't exist)
2016-05-17 10:54:25,539 INFO (Dialect.java:145) - HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
2016-05-17 10:54:25,569 INFO (LobCreatorBuilder.java:88) - HHH000422: Disabling contextual LOB creation as connection was null
2016-05-17 10:54:26,272 INFO (TransactionFactoryInitiator.java:62) - HHH000399: Using default transaction strategy (direct JDBC transactions)
2016-05-17 10:54:26,283 INFO (ASTQueryTranslatorFactory.java:47) - HHH000397: Using ASTQueryTranslatorFactory
2016-05-17 10:54:26,383 INFO (Version.java:56) - Hibernate Validator 4.1.0.Final
2016-05-17 10:54:26,397 INFO (DefaultTraversableResolver.java:81) - Instantiated an instance of org.hibernate.validator.engine.resolver.JPATraversableResolver.
2016-05-17 10:54:27,726 INFO (SchemaUpdate.java:207) - HHH000228: Running hbm2ddl schema update
2016-05-17 10:54:27,727 INFO (SchemaUpdate.java:218) - HHH000102: Fetching database metadata
2016-05-17 10:54:27,737 ERROR (SchemaUpdate.java:226) - HHH000319: Could not get database metadata

1个回答

hibernate配置文件链接数据库有问题吧,是不是没有配置好,可以试试阿里的druid

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问