Skip to content

[Linux] Setting up the Database

wowus edited this page Sep 14, 2010 · 4 revisions

Introduction

If you’re running Linux, congratulations! Free software is great. In this article we’ll teach you how to get the database up and running.

Getting MySQL

If you’re running any modern Linux distro (personally, I use Gentoo), you have a package manager that you’re used to using. This is great. Use that package manager, whatever it may be, to get the mysql package. Setting up and configuring MySQL is different on every distro, so I won’t even try. All I can say is: “Make sure to read the output of your package manager and configure MySQL.”

Setting up the Database

Once MySQL is installed, you need to import the database from our packaged SQL files. Now, if you downloaded GoGo from source, these can be found at $PROJECT_ROOT/gogo/config. If you downloaded one of the official distributions, these can just be found in the .zip file. The file you’re looking for is called my.sql. Once you’re in that directory (at this point, I assume you’re in the terminal. If you aren’t, get in), type mysql -u root -p. If you didn’t set up MySQL with a password, just hit enter at the prompt.

In the REPL

Now that you’re in mysql (you can tell by the mysql> ), you can start setting up your db! Type the following:

create database GunzDB;
use GunzDB;
source my.sql;

You should see a bunch of text fly by your screen (and maybe even warnings!). This is normal. Errors are not. At this point, you can exit out of the REPL by typing exit.

Congratulations! Your database is all set up to be used by GoGo. If you got fancy with the configuration, don’t forget to modify gogo.conf accordingly.