Flash Multiplayer Virtual Worlds
上QQ阅读APP看书,第一时间看更新

Connecting SmartFoxServer and MySQL server

SmartFoxServer is a Java application and Java database connection driver is needed to connect from SmartFoxServer to MySQL database.

Downloading JDBC Driver for MySQL

JDBC is a Java database connection driver that we need to establish connections between the Java-based SmartFoxServer and the MySQL server. The JDBC driver for MySQL is called Connector/J. We are going to install it to enable MySQL connection from SmartFoxServer.

  1. Go to http://dev.mysql.com/downloads/connector/j/5.1.html in web browser.
  2. Download the Platform Independent Zip Archive.
  3. It may ask you to log in to MySQL.com account. Click on No thanks, just take me to the downloads! to bypass the login step.
  4. Choose a mirror to download by clicking on HTTP.

Setting up the JDBC driver

The MySQL Java connector comes with a bunch of files. We only need two among them.

  1. Extract the mysql-connector-java-5.1.10.zip file to a temporary folder.
  2. Open the folder and find the mysql-connector-java-5.1.10-bin.jar file.
  3. Copy that jar file into SmartFoxServer installation directory | jre | lib | ext.
  4. Go into the src directory of the extracted directory and copy the org directory to SmartFoxServer installation directory | jre | lib | ext.