Location: PHPKode > projects > Druid Defect Control > defectcontrol_0.9.4/doc/installation-mysql.html
<title>Defect Control System</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="style.css">
<?include 'header.php' ?>
<body bgcolor="#FFFFFF">

<h1 align="center">Installation-MySQL</h1>
<p align="center">&nbsp;</p>
<table width="80%" border="0" cellspacing="2" cellpadding="0" align="center">
      <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>&nbsp;&nbsp;&nbsp;&quot;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=''. &quot;</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 &lt; <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>
        <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). 
        <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>
      <p>&nbsp; </p>
Return current item: Druid Defect Control