Code

Docs update for mysql and postgresl: Mentioned test/db_test_base.py because
[roundup.git] / doc / mysql.txt
index a4180fcab437aa730731ae5140d6a352dd632d4f..393a011618cf1c205080cfacb82dbf53578db077 100644 (file)
@@ -2,60 +2,59 @@
 MySQL Backend
 =============
 
-This is notes about mysql backend for roundup issue tracker.
+:version: $Revision: 1.13 $
+
+This notes detail the MySQL backend for the Roundup issue tracker.
 
 
 Prerequisites
 =============
 
-To use MySQL as backend for storing roundup data, you should additionally
-install:
-
-    1. MySQL RDBMS 3.23.34 or higher - http://www.mysql.com. Your MySQL
-       installation should support Berkeley DB (BDB) tables for transaction
-       support.
-    2. Python interface to mysql - http://sourceforge.net/projects/mysql-python
+To use MySQL as the backend for storing roundup data, you also need 
+to install:
 
+1. MySQL RDBMS 4.0.18 or higher - http://www.mysql.com. Your MySQL
+   installation MUST support InnoDB tables (or Berkeley DB (BDB) tables
+   if you have no other choice). If you're running < 4.0.18 (but not <4.0)
+   then you'll need to use BDB to pass all unit tests. Edit the
+   ``roundup/backends/back_mysql.py`` file to enable DBD instead of InnoDB.
+2. Python MySQL interface - http://sourceforge.net/projects/mysql-python
 
-How to run mysql tests?
+Running the MySQL tests
 =======================
 
-Roundup tests expect an empty database available for use. There are two ways how to
-provide this:
+Roundup tests expect an empty MySQL database. Two alternate ways to provide 
+this:
 
-    1. If you have root permissions on mysql server, you can create necessary
-       database using this SQL sequence:
+1. If you have root permissions on the MySQL server, you can create 
+   the necessary database entries using the follwing SQL sequence. Use
+   ``mysql`` on the command line to enter::
 
-       CREATE DATABASE rounduptest
-       GRANT ALL PRIVILEGES ON rounduptest TO rounduptest@localhost IDENTIFIED BY 'rounduptest'
-       FLUSH PRIVILEGES
+       CREATE DATABASE rounduptest;
+       USE rounduptest;
+       GRANT ALL PRIVILEGES ON rounduptest.* TO rounduptest@localhost
+            IDENTIFIED BY 'rounduptest';
+       FLUSH PRIVILEGES;
 
-    2. If your administrator has provided you with database connection info, you
-       can modify MYSQL_* constants in test/test_db.py with corresponding
-       values.
+2. If your administrator has provided you with database connection info, 
+   see the config values in 'test/db_test_base.py' 
+   about which database connection, name and user will be used.
 
-Note, that mysql database should not contain any tables. Tests will not dare to
-drop database with data.
+The MySQL database should not contain any tables. Tests will not 
+drop the database with existing data.
 
 
-Additional configuration
+Showing MySQL who's boss
 ========================
 
-To initialise and use mysql database roundup' configuration file (config.py in
-the tracker' home directory) should be appended with the following constants:
-
-    MYSQL_DBHOST = 'localhost'
-    MYSQL_DBUSER = 'rounduptest'
-    MYSQL_DBPASSWORD = 'rounduptest'
-    MYSQL_DBNAME = 'rounduptest'
-    MYSQL_DATABASE = ( MYSQL_DBHOST, MYSQL_DBUSER, MYSQL_DBPASSWORD, MYSQL_DBNAME )
-
-Fill first four constants with real values before running 
-"roundup-admin initialise". 
-
-
+If things ever get to the point where that test database is totally hosed,
+just::
 
-    Andrey Lebedev <andrey@micro.lt>
+  $ su -
+  # /etc/init.d/mysql stop
+  # rm -rf /var/lib/mysql/rounduptest
+  # /etc/init.d/mysql start
 
+and all will be better (note that on some systems, ``mysql`` is spelt
+``mysqld``).
 
- vim: et tw=80