Home
Screenshots
Downloads
Forums
Docs
Servers
Stats
IRC Chat
Mods
SpecialSpecial  SearchSearch  LoginLogin
Main Page -> Stats logging for servers

Contents

Building the game with MySql Suport under Unix

Note: Windows builds come pre-compiled for mysql support so this step is not required for windows servers

Obtain a copy of the scorched3d source

Download source from the download page

Obtain a copy of the mysql development libraries

Download mysql development (libraries and header files) rpm from the download page Install the mysql development rpm.

Compile scorched3d

Compile instructions,
cd <scorched_directory> (cd into scorched directory)'
make distclean (clean settings)
sh autgen.sh --with-mysql (configure scorched, --with-mysql flag required)
make (compile)
make install (install)

Setting up the Database

MySql Database type

Download & Install

Download & install the latest MySql server package from Mysql.com

Create the stats tables

Access the database through the internal console client; then type
create database scorched3d;
use scorched3d;
source Installation Path/data/mystatstables.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

Fix the password access (MySql >= 5.x.x)

Inside the database client console type:

set password for 'root'@'localhost' = old_password ("yourpassword");

where yourpassword is the password you are going to use

Configure the server to access the database

Set the database access

copy the file located in your Installation Path/data/mysql.xml to your User Data Directory.

Open the file with a text editor (for example: notepad in Windows). Write between the tags <passwd></passwd> the password you used for the database.

Enable the stats logging

open the file User Data Directory/server.xml with a a text editor (for example: notepad in Windows). Search for the tag called: <name>ServerLogger</name> and change the <value>none</value> to <value>mysql</value> or <value>pgsql</value>, according to your database type

Useful database commands for running servers

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.

Create a new stat series

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.

Rename a stat series

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.



Edit this pagePage historyWhat links hereRelated changes
Student Loan Consolidation | Cheap satellite television | Bad Credit Loan | Commercial Loan | Flights
Safe
OpenGL Supporter Available for Linux Available for Windows Available for Mac Available for Solaris Available for Gentoo Available for Debian Available for Slackware Available for FreeBSD
Donate to Scorched3D Visit Scorched3D at SourceForge.net Get it from CNET Download.com! 5 Stars
© Copyright 2008 Gavin Camp. All Rights reserved.