首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在MySQL中配置SmartFoxServer服务器连接

在MySQL中配置SmartFoxServer服务器连接
EN

Stack Overflow用户
提问于 2013-09-02 06:48:11
回答 1查看 1.8K关注 0票数 0

我一直试图通过config.xml中的JDBC连接mysql。

我已经将默认值更改为适当的值,如下所示:

代码语言:javascript
复制
<DatabaseManager active="true">


        <Driver>org.gjt.mm.mysql.Driver</Driver>
        <ConnectionString>jdbc:mysql://127.0.0.1:3306/mysql</ConnectionString>

        <UserName>root</UserName>
        <Password></Password>

        <TestSQL><![CDATA[SELECT NOW()]]></TestSQL>

        <MaxActive>10</MaxActive>
        <MaxIdle>10</MaxIdle>

        <OnExhaustedPool>fail</OnExhaustedPool>
        <BlockTime>5000</BlockTime>

</DatabaseManager>

但是,当我尝试启动SmartFoxServer时,会得到以下错误:

代码语言:javascript
复制
        DB Manager Activated ( org.gjt.mm.mysql.Driver )
Can't load db driver: org.gjt.mm.mysql.Driver
11:13:16.054 - [ SEVERE ] > DbManager could not retrive a connection. java.sql.S
QLException: Configuration file not found
it.gotoandplay.smartfoxserver.exceptions.DbManagerException: The Test SQL statem
ent failed! Please check your configuration.
        at it.gotoandplay.smartfoxserver.SmartFoxServer.setupZone(SmartFoxServer
.java:1843)
        at it.gotoandplay.smartfoxserver.lib.ConfigReader.parse_Zones(ConfigRead
er.java:806)
        at it.gotoandplay.smartfoxserver.lib.ConfigReader.readZoneConfig(ConfigR
eader.java:174)
        at it.gotoandplay.smartfoxserver.SmartFoxServer.initServerSocket(SmartFo
xServer.java:339)
        at it.gotoandplay.smartfoxserver.SmartFoxServer.run(SmartFoxServer.java:
607)
Problems in config file: The Test SQL statement failed! Please check your config
uration.
it.gotoandplay.smartfoxserver.exceptions.ConfigurationException: The Test SQL st
atement failed! Please check your configuration.
        at it.gotoandplay.smartfoxserver.lib.ConfigReader.readZoneConfig(ConfigR
eader.java:199)
        at it.gotoandplay.smartfoxserver.SmartFoxServer.initServerSocket(SmartFo
xServer.java:339)
        at it.gotoandplay.smartfoxserver.SmartFoxServer.run(SmartFoxServer.java:
607)

Errors found in configuration files.
Unable to start the server.


Shutting down server...

Press any key to continue . . .

请告诉我我做错了什么?

任何帮助都将不胜感激。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-09-02 11:24:58

我找到了答案。

应将MySQL连接器/J复制到:

代码语言:javascript
复制
C:\ProgramFiles(x86)\MySQL\MySQL Connector J\mysql-connector-java-5.1.26-bin.jar

致:

代码语言:javascript
复制
C:\Users\username\SmartFoxServerPRO_1.6.6\jre\lib\ext\

然后重新启动SFS。

就像一种魅力。祝好运。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18567132

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档