java - How to Connect a MySQL Database with SmartFoxServer 2X? -
i have started use smartfoxserver 2x
. used use smartfoxserver pro
, decided should use html5
, did it. anyway, there problem database manager. first, tell have done far:
i downloaded "mysql-connector-java-5.1.38-bin.jar" file mysql's website.
and copied "smartfoxserver 2x\sfs2x\extensions__lib__" folder.
after that, entered admin tool > zone configurator > database manager.
activate = yes
database driver class = com.mysql.jdbc.driver
connection string = jdbc:mysql://localhost:3306/login
username = root
password = my_mysql_password
test sql = select * users
and restarted server.
it gave me error:
exception: java.lang.classnotfoundexception message: com.mysql.jdbc.driver description: initialization of dbmanager has failed. possible causes: if database driver not 'seen' int server classpath setup fails. make sure deploy driver .jar file in extensions/__lib__/ folder , restart 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)
what should do?
you need place "mysql-connector-java-5.1.38-bin.jar inside
smartfoxserver2x/sfs2x/lib folder
for further configurations check link: [https://www.youtube.com/watch?v=pfsmbrj4gdu&list=plad3a1b608aca09c0&index=10][1]
Comments
Post a Comment