Contents |
Note: Windows builds come pre-compiled for mysql support so this step is not required for windows servers
Download source from the download page
Download mysql development (libraries and header files) rpm from the download page Install the mysql development rpm.
Note: Scorched3D will work just fine with an existing database install if available.
Download & install the latest MySql server package from Mysql.com
Access the database through the internal console client; then type:
create database scorched3d; use scorched3d; source Installation Path/data/statstables.sql
(MySql is very picky about the slash type, make sure that you use the type used in the guide)
Optional, to check if the tables were created correctly, type:
use scorched3d; show tables;
Every table name shown should start with the scorched3d prefix.
e.g. scorched3d_events scorched3d_eventtypes scorched3d_ipaddress scorched3d_names scorched3d_officialservers scorched3d_players scorched3d_prefixs scorched3d_series scorched3d_serverlist ...
Inside the database client console type:
set password for 'root'@'localhost' = old_password ("yourpassword");
where yourpassword is the password you are going to use
copy the file located in your Installation Path/data/mysql.xml to your User Data Directory. You must then rename this file to be mysql-port#.xml.
e.g. cp /opt/scorched3d/data/mysql.xml ~/.scorched3d/mysql-27270.xml
The port# is the one used for the players to connect to your server.
eg. The default port is 27270 so this would be mysql-27270.xml
Open the file with a text editor (for example: notepad in Windows, or vi on unix). Fill in the required information between the empty tags.
e.g. For a mysql database that you connect to as root with no password :
<mysql>
<host>localhost</host>
<user>root</user>
<passwd></passwd>
<db>s3d</db>
<prefix>main</prefix>
<port>/var/lib/mysql/mysql.sock</port>
</mysql>
open the file User Data Directory/server.xml with a a text editor (for example: notepad in Windows or vi on unix).
Search for the tag called: <name>StatsLogger</name> and change the <value>none</value> to <value>mysql</value> or <value>pgsql</value>, according to your database type
Once the stats are being collected there are some administration tasks that may be required. All the commands must be entered through the database client console.
use scorched3d; update scorched3d_series set type=1 where seriesid="'#'";
The # is an incremental value, starts by default with 1, check the server logs to see what series is currently running.
update scorched3d_series set name="Series Name" where seriesid="'#'";
The # is an incremental value, starts by default with 1, check the server logs to see what series is currently running.