blob: b5e2deaf01a85c1e88a7e41aceeb9761f3eb72ef [file] [log] [blame]
Setting up the database.
apt-get install mysql-server-5.0 python-mysqldb
In this example, we use 'bob' as the user.
Now log into the main database as root:
$ mysql -u root -p mysql
mysql> create database tko;
mysql> grant SELECT,INSERT,UPDATE,DELETE,CREATE,DROP on tko.* TO 'bob'@'localhost' identified by 'a_password';
mysql> grant SELECT on tko.* TO 'nobody'@'localhost';
mysql> quit
$ mysql -u bob -pa_password tko < create_db
You could connect to the db if you wanted to:
$ mysql -u bob -pa_password tko
Now, so that you can access the database from db.py, you need to create
a .login file with two lines
bob
a_password
NOW CHMOD THIS FILE SO ONLY YOU CAN READ IT!
$ chmod 600 .login
--------------------------------------------------
To generate data:
./parse <data directory>
This should create "tko_db"
SOME THINGS ARE STILL HACKY ^W IN DEVELOPMENT
There are two separate sets of code. The backend creates the database.
parse, parse.py
The frontend parses the data for display: display.py, frontend.py, *.cgi
db.py is shared.