C3P0 automaticTestTable配置,报错,mysql 8小时

automatic test table 'admin' contains rows, and it should not! Please set this parameter to the name of a table c3p0 can create on its own, that is not used elsewhere in the database!

automaticTestTable = C3P0TestTable

automaticTestTable作为测试connection是否有效的表,如果表存在,但有记录,抛出错误,如果表不存在,则建立,并使用SELECT * FROM automaticTestTable 作为连接测试语句

所以automaticTestTable 的设置,不能设置一个有记录的表,就算设置一个库里不存在的表也没关系,因为C3P0会自动创建

黑色头发:http://heisetoufa.iteye.com/

猜你喜欢

转载自heisetoufa.iteye.com/blog/1495339