<html>
<head>
<title>Defect Control System</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="style.css">
</head>
<?include 'header.php' ?>
<body bgcolor="#FFFFFF">
<p> </p>
<h1 align="center">Installation-MySQL</h1>
<p align="center"> </p>
<table width="80%" border="0" cellspacing="2" cellpadding="0" align="center">
<tr>
<td>
<h2><font size="2">Release 0.9</font></h2>
<p><font size="2">This software is still under development. </font></p>
<p><font size="2">This document will be updated also.</font></p>
<h2><font size="2">Specific instructions for setting up MySQL backends</font></h2>
<p><font size="2">The procedure of database creation slightly varies from
the default postgres installation to one that uses mysql. </font></p>
<p><font size="2">First, you need to decide what database user will own
the database. It is not a good idea to use the database administrator
(usually root), since you will have to specify the password in clear text
in the configuration file of the application (config.php).</font></p>
<p><font size="2">We will assume you are using user 'tts', as in the default
installation document. That said, normally you can test connection to
mysql server with a command like</font></p>
<p><font size="2"> <font face="Courier New, Courier, mono">mysql -u tts
--host <i>your_mysql_host</i> tts -p</font></font></p>
<p><font size="2">This will prompt for the password of user tts, and connect
to the test database (present in mysql default installation). If you see
any error, refer to the MySQL documentation for instructions on how to
setup your database. Permission schema in mysql is a bit tricky. In particular,
you can be affected by this (from the mysql manual): </font></p>
<p><font size="2"><i> "If you can't figure out why
you get Access denied, remove from the user table all entries that have
Host values containing wild cards (entries that contain `%' or `_'). A
very common error is to insert a new entry with Host='%' and User='some
user', thinking that this will allow you to specify localhost to connect
from the same machine. The reason that this doesn't work is that the default
privileges include an entry with Host='localhost' and User=''. Because
that entry has a Host value 'localhost' that is more specific than '%',
it is used in preference to the new entry when connecting from localhost!
The correct procedure is to insert a second entry with Host='localhost'
and User='some_user', or to remove the entry with Host='localhost' and
User=''. "</i></font></p>
<p><font size="2">Try to create a database for the new application. In our
sample, the database will be called also 'tts': </font></p>
<p><font face="Courier New, Courier, mono" size="2">mysqladmin -u tts -p
create tts</font></p>
<p><font size="2">Enter the password for user tts and it will create a new
database. Again, if you see any errors, refer to the mysql manual. </font></p>
<p><font size="2">Once this is done, proceed with the creation of tables
and initial values for the application, like this: </font></p>
<p><font size="2" face="Courier New, Courier, mono">mysql -u tts -p<i>tts_user_
password</i> tts < <i>/installation_directory</i>/setup/createtables.sql.mysql</font></p>
<p><font size="2">Here you specify the password in the command line because
you are redirecting the standard input. There should be no errors in the
output. </font></p>
<p><font size="2">Now edit the config.php file and adjust settings as described
in the normal installation. Make sure that for MySQL the following is
true: </font></p>
<ul>
<li><font size="2" face="Courier New, Courier, mono">define('DATABASE_IMPLEMENTATION',
'database-mysql.php')</font><font size="2"> is NOT commented out, and
that the entry for the rest of the backends ARE (with // at the beggining).
</font></li>
<li><font size="2">the values for DB_SERVER, DB_DATABASE, DB_USER and
DB_PASS hold the values you have used in the previous steps. </font></li>
</ul>
<p> </p>
<p> </p>
<p> </p>
</td>
</tr>
</table>
<p> </p>
</body>
</html>