Page 1 of 1

Database connection setup

Posted: 07 Apr 2008, 16:20
by ramindeja
Hi,

I would like to get more information about how to setup the JDBC driver for MySQL on my server where SmartFox is installed.

As I read the tutorials and documentations about this topic, there was always a reference to JRE and the JRE/lib/ext folder. Well, I don't seem to have the JRE installed or at least the name is not the same. I have Java on the server and SmartFox works fine. The only path that I could find that had a lib/etc/ was by using the command 'locate' and I got these locations:

/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext
/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/ext

I know that SmartFox is using the version 1.5.

I also downloaded the JDBC driver: mysql-connector-java-5.1.6-bin.jar.

Can somebody please tell me where do I have to place this driver and are there any other settings that I need to do.

Much appreciated.

Posted: 08 Apr 2008, 16:18
by Lapo
Using the Mac it's a little more complicated because OSX comes with multiple embedded JREs that use different folders.

The best way to do this is to add a reference to the library in the classpath.
Do the following:

1. copy the library in the Server/lib/ folder
2. edit the start.sh script file and add the lib/mysql-connector-java-5.1.6-bin.jar entry in the classpath

In the file you'll see something like this

Code: Select all

java -cp "./:./sfsExtensions/:lib/activation.jar:lib/commons-beanutils.jar:
simply add the entry between colons (":")

Code: Select all

java -cp mysql-connector-java-5.1.6-bin.jar:./:./sfsExtensions/:lib/activation.jar:lib/commons-beanutils.jar:
save and start the server