首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何用MySQL 2X连接SmartFoxServer数据库?

如何用MySQL 2X连接SmartFoxServer数据库?
EN

Stack Overflow用户
提问于 2016-01-27 11:51:18
回答 1查看 1.4K关注 0票数 0

我已经开始使用SmartFoxServer 2x了。我曾经使用过SmartFoxServer Pro,但是我决定使用HTML5,所以我做了。无论如何,数据库管理器有一个问题。首先,我要告诉你们我到目前为止做了什么:

  1. 我从MySQL的网站下载了“MySQL-连接器-java-5.1.38-bin.jar”文件。
  2. 我把它复制到"SmartFoxServer 2X\SFS2X\extensions__lib__“文件夹中。
  3. 之后,我输入了管理工具>区域配置器>数据库管理器。
  4. 激活=是
  5. 数据库驱动程序类= com.mysql.jdbc.Driver
  6. 连接字符串=jdbc:mysql://localhost:3306/登录
  7. 用户名=根
  8. 密码= my_mysql_password
  9. 测试SQL = SELECT *从用户
  10. 我重新启动了服务器。

它给了我一个错误:

代码语言:javascript
复制
Exception: java.lang.ClassNotFoundException
Message: com.mysql.jdbc.Driver 
Description: The initialization of the DBManager has failed.
Possible Causes: if the database driver is not 'seen' int the server classpath the setup fails.
Make sure to deploy the driver .jar file in the extensions/__lib__/ folder and restart the Server.
+--- --- ---+
Stack Trace:
+--- --- ---+
java.net.URLClassLoader$1.run(Unknown Source)
java.net.URLClassLoader$1.run(Unknown Source)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(Unknown Source)
java.lang.ClassLoader.loadClass(Unknown Source)
sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
java.lang.ClassLoader.loadClass(Unknown Source)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Unknown Source)
com.smartfoxserver.v2.db.SFSDBManager.setupDriver(SFSDBManager.java:345)
com.smartfoxserver.v2.db.SFSDBManager.init(SFSDBManager.java:62)
com.smartfoxserver.v2.entities.managers.SFSZoneManager.configureDBManager(SFSZoneManager.java:638)
com.smartfoxserver.v2.entities.managers.SFSZoneManager.createZone(SFSZoneManager.java:406)
com.smartfoxserver.v2.entities.managers.SFSZoneManager.initializeZones(SFSZoneManager.java:249)
com.smartfoxserver.v2.SmartFoxServer.start(SmartFoxServer.java:266)
com.smartfoxserver.v2.Main.main(Main.java:27)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
com.exe4j.runtime.WinLauncher.main(Unknown Source)
com.install4j.runtime.launcher.WinLauncher.main(Unknown Source)

我该怎么办?

EN

回答 1

Stack Overflow用户

发布于 2016-08-31 13:16:44

您需要正确地将“mysql-连接器-java-5.1.38-bin.jar”放置在

SmartfoxServer2X/SFS2X/lib文件夹

有关进一步的配置,请查看以下链接:[https://www.youtube.com/watch?v=PFSMBRJ4gdU&list=PLAD3A1B608ACA09C0&index=10][1]

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

https://stackoverflow.com/questions/35036618

复制
相关文章

相似问题

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