0

我一直在尝试通过 JDBC 连接到 mysql config.xml

我已将默认值更改为正确的值,如下所示:

<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 时,出现以下错误:

        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 . . .

请告诉我我做错了什么?

任何帮助将不胜感激。

4

1 回答 1

1

我找到了答案。

应该将 MySQL Connector/J 复制到:

C:\ProgramFiles(x86)\MySQL\MySQL Connector J\mysql-connector-java-5.1.26-bin.jar

到 :

C:\Users\username\SmartFoxServerPRO_1.6.6\jre\lib\ext\

然后重新启动 SFS。

它就像一个魅力。祝你好运。

于 2013-09-02T11:24:58.180 回答