Openfire启动时报数据库链接错误

【问题描述】
java

2013.12.26 15:57:03 org.jivesoftware.openfire.XMPPServer - java.sql.SQLException: ConnectionManager.getConnection() failed to obtain a connection after 11 retries. The exception from the last attempt is as follows: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'openfire'mysql

java.lang.IllegalArgumentException: java.sql.SQLException: ConnectionManager.getConnection() failed to obtain a connection after 11 retries. The exception from the last attempt is as follows: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'openfire'
at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:770)
at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:486)
at org.jivesoftware.openfire.XMPPServer.<init>(XMPPServer.java:216)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.jivesoftware.openfire.starter.ServerStarter.start(ServerStarter.java:113)
at org.jivesoftware.openfire.starter.ServerStarter.main(ServerStarter.java:58)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.exe4j.runtime.WinLauncher.main(Unknown Source)
Caused by: java.sql.SQLException: ConnectionManager.getConnection() failed to obtain a connection after 11 retries. The exception from the last attempt is as follows: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'openfire'
at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager.java:151)
at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:760)

... 16 moresql

【解决方案】 mysql中的openfire对应数据库丢了,丢失缘由未知数据库