» Database connection

Once you have deployed a database server you can connect one or more SmartFoxServer instances to it by configuring the details in your Zone, via the AdminTool.

If you're not familiar with the basics of connecting SFS2X to a database we highly recommend to review the SmartFoxServer documentation here.

» Setting up the connection

Connect to your SmartFox instance via the AdminTool, select the Zone Configurator module and click the Database Manager tab.

database config

Proceed with completing the fields as in the picture:

Finally hit the Submit button and restart SFS2X for the changes to be activated.

» Choosing the MySQL connector

Out of the box we install the MariaDB JDBC connector which is an alternative JDBC driver to the official MySQL connector and which comes with an LGPL license. This allows us to avoid licensing issues when distributing the library with SmartFoxServer 2X.

On the other hand, the official MySQL JDBC Driver comes with a GPL license and can be installed by the customer, if necessary.

If your project requires the official driver you can download the jar file from the link above and upload it to your SmartFoxServer instance via the AdminTool > Extension Manager under the __lib__/ folder

Upload database driver

Just select the __lib__ folder, hit the upload icon and browse the local disk for the driver's jar file.

When using the MySQL connector the same settings as above can be used with the exception of the following: