站内搜索
发表回复
收藏 

MySQL数据库问题 

MySQL数据库问题

config.xml修改好了,数据库建了,sql脚本也运行了,表好的。打开报错,,,这是哪里没弄对嘛?


config.xml配置:


<?xml version="1.0" encoding="UTF-8"?>
<config> 
   
 
    DB Connection Pool - Mysql
  <database maxActive="10" maxIdle="10" minIdle="2" maxWait="10000" 
   username="root" password="123456" 
     driverClassName="com.mysql.jdbc.Driver" 
     url="jdbc:mysql://localhost:3306/ejforum
characterEncoding=utf8;autoReconnect=true;autoReconnectForPools=true;zeroDateTimeBehavior=convertToNull"
     sqlAdapter="sql.MysqlAdapter"/>
   

    <!-- Forum System Properties -->
  <system adminUser="administrator"/>

    <!-- Forum General Properties - Don't change it unless necessary -->
  <misc>
<charset>UTF-8</charset>
  <maxMemberPages>20</maxMemberPages> 
  <maxSessionPosts>10</maxSessionPosts>
  <maxDailyPosts>30</maxDailyPosts>
  <maxFavorites>50</maxFavorites>
  <maxShortMsgs>50</maxShortMsgs>
  <maxAvatarPixels>150</maxAvatarPixels>
</misc>
</config>

数据库截图:
QQ截图20150429114635.jpg
 

报错:



SEVERE: EasyJForum AppContext : error in init().
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Unknown database 'ejforum characterencoding=utf8&autoreconnect=true&autoreconnectf')
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)
at com.hongshee.common.util.DBManager.getConnection(Unknown Source)
at com.hongshee.ejforum.data.UserDAO.initAdminUser(Unknown Source)
at com.hongshee.ejforum.common.AppContext.init(Unknown Source)
at com.hongshee.ejforum.common.ContextListener.contextInitialized(Unknown Source)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4210)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4709)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:802)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:583)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1079)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1002)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:506)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1068)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1060)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:759)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Unknown database 'ejforum characterencoding=utf8&autoreconnect=true&autoreconnectf'
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2941)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:868)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3340)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1238)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2743)
at com.mysql.jdbc.Connection.<init>(Connection.java:1553)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
at org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)
at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:877)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:851)
Unknown database 'ejforum 。。。数据库名称错误。
本论坛开发者 QQ:980766123
引用:
引用文字太长,省略...

--- 原帖序号: 0#,  由 小牧 于 2015-04-29 12:01  发表

测试引用
引用:
Unknown database 'ejforum 。。。数据库名称错误。


测试处理
发表回复
查看积分策略说明

快速回复主题

标题  (可选)
内容

恢复自动保存的数据