Skip to content

[Windows] Setting up The Database

wowus edited this page Sep 14, 2010 · 8 revisions

Introduction

This is how you set up your database for use with our GunZ emulator.

First, you’ll need MySQL. You can get the free version of MySQL from that link.

We recommend MySQL 5.1 because our developer team is using it. MySQL 5.5 may work, but we do not support it. MySQL 5.1 is also the Generally Available MySQL edition, as compared to MySQL 5.5 which is a developer’s version (If you don’t normally develop, we reccomend you use MySQL 5.1.47)

Setting up your MySQL server with InnoDB

First, run the MySQL installer as found in the above link. The default installation options should work, so just press next until you get to the MySQL configuration wizard.

When you are at the screen where it says MySQL Instance Configuration Wizard, you will want very specific options to ensure your database is installed correctly.

The first thing you should do after pressing next on the first few windows is choosing a detailed configuration. This allows us to pinpoint MySQL’s features that are available to us.

Next, you will want to choose Server Machine. The default settings for this are fine. Do not chose Developer.

On the next screen you will want to choose the option Transactional Database Only. This makes InnoDB the default storage engine for use with MySQL, and will allow the use of foreign keys (which we use).

The next screen should show where the InnoDB table files are set up at. You will want to make sure they are in the default location (unless, for example, you have your MySQL install on a drive with little space, then you may want to reconfigure it elsewhere.)

On the next screen you will want to use Online Transaction Processing (OLTP). This will allow multiple people to connect to your database (for example, a webserver accessing your database will need its own MySQL connection)

On the next screen, you should enable TCP/IP networking, keep the default port (if you want to change it, you can, but for this guide we are using the default port), add a firewall exception (only if you are on windows & want people outside of your network to be able to connect), and disable strict mode.

On the next screen, you will want to choose Best Support for Multilinguism. This is so you people with funky character names will still have them working on our database.

Next screen keep the defaults checked, and also check the “Include Bin Directory in Windows PATH” option. This will allow you to type “mysql” in the command prompt which will be needed later in this guide.

Next screen you can keep no default password for root, or set it to “password” to make the default configuration files that ship with GoGo work without modification. If you have RDP or some other service running in the background, then it is strongly recommended to set a password. Why do we recommend a simple or no password? Only local connections are accepted. That means anyone connecting from anywhere other than your computer cannot connect to to the MySQL instance. This makes passwords a bit redundant.

Next screen hit execute, and your basic database configuration is set up.

After that, you will want to open a windows command prompt. If you are on Windows 7 (or Vista, but we like to pretend it doesn’t exist), type cmd into your search bar.

Navigate to the gogo/db directory in the source tree using the change directory command in windows, on my system it would look like this:

cd C:\Users\Specials\Desktop\GoGo\gogo\config\

After you have changed your directory, you will want to execute this in the command line. If you followed the guide up to this point, you should have no issues.

mysql -u root -p

It should ask for a password. If you set up a password earlier in the guide, enter it here.

You should now be at the MySQL command prompt, noted by mysql>
You should now be able to source the database. First, we want to create it. Type this into the command prompt:

create database GunzDB;

After it is done, it should say Query OK, 0 rows affected.
Now you are ready to source the GunZ database. You will type this into the command prompt next:

use GunzDB;

Now you are using the database. This is needed every time you go to update your database. Next, you should type this in:

source my.sql;

You should see a bunch of text fly by on your screen. This is normal.

Congrats, you set up GoGo for use with a Windows Database!