Code

- Add tests for Interval.pretty().
[roundup.git] / doc / mysql.txt
1 =============
2 MySQL Backend
3 =============
5 :version: $Revision: 1.7 $
7 This notes detail the MySQL backend for the Roundup issue tracker.
10 Prerequisites
11 =============
13 To use MySQL as the backend for storing roundup data, you also need 
14 to install:
16 1. MySQL RDBMS 4.0.16 or higher - http://www.mysql.com. Your MySQL
17    installation MUST support InnoDB tables (or Berkeley DB (BDB) tables
18    if you have no other choice). If you're running < 4.0.16 (but not <4.0)
19    then you'll need to use BDB to pass all unit tests. Edit the
20    ``roundup/backends/back_mysql.py`` file to enable DBD instead of InnoDB.
21 2. Python MySQL interface - http://sourceforge.net/projects/mysql-python
23 :Note: the InnoDB implementation has a bug that Roundup tickles. See
24        http://bugs.mysql.com/bug.php?id=1810
26 Running the MySQL tests
27 =======================
29 Roundup tests expect an empty MySQL database. Two alternate ways to provide 
30 this:
32 1. If you have root permissions on the MySQL server, you can create 
33    the necessary database entries using the follwing SQL sequence. Use
34    ``mysql`` on the command line to enter::
36        CREATE DATABASE rounduptest;
37        USE rounduptest;
38        GRANT ALL PRIVILEGES ON rounduptest.* TO rounduptest@localhost
39             IDENTIFIED BY 'rounduptest';
40        FLUSH PRIVILEGES;
42 2. If your administrator has provided you with database connection info, 
43    you can modify MYSQL_* constants in the file test/test_db.py with 
44    the correct values.
46 Note that the MySQL database should not contain any tables. Tests will not 
47 drop the database with existing data.
50 Additional configuration
51 ========================
53 To initialise and use the MySQL database backend, roundup's configuration 
54 file (config.py in the tracker's home directory) should have the following
55 entries::
57     MYSQL_DBHOST = 'localhost'
58     MYSQL_DBUSER = 'rounduptest'
59     MYSQL_DBPASSWORD = 'rounduptest'
60     MYSQL_DBNAME = 'rounduptest'
61     MYSQL_DATABASE = ( MYSQL_DBHOST, MYSQL_DBUSER, MYSQL_DBPASSWORD,
62         MYSQL_DBNAME )
64 Fill in the first four entries with values for your local MySQL installation 
65 before running "roundup-admin initialise".  Use the commands in the `Running the
66 MySQL tests` to set up a database if you have privilege, or ask your local
67 administrator if not.