Install process fails creating db tables.

Get help from other users here.

Moderators: Contributor, Developer

Install process fails creating db tables.

Postby Hamster » Jul 01, 2007 4:04 pm

Hello,

I am trying to install Mantis-1.0.8 on a Linux Ubuntu (7.04 - Feisty Fawn) server.

I have mysql-server version 5.0.38-0ubuntu1 and php 5.2.1-0ubuntu1.2.

I have downloaded the tarball for mantis 1.0.8 and have Apache working to the point where I can successfully load the admin/install.php file.

After filling in the form provided by install.php, I get the following output and error:

Code: Select all
   [ Back to Administration ] Check and Install Database

                         Setting Database Hostname                  GOOD
                         Setting Database Type                      GOOD
                         Checking PHP support for database type     GOOD
                         Setting Database Username                  GOOD
                         Setting Database Password                  GOOD
                         Setting Database Name                      GOOD
                         Setting Admin Username                     GOOD
                         Setting Admin Password                     GOOD
                         Attempting to connect to database as admin GOOD
   Checking Database Server Version
   Running mysql version GOOD
   
   Installing Database
   Create database if it does not exist GOOD
   Attempting to connect to database as user GOOD
   Create Schema ( CreateTableSQL on mantis_config_table ) BAD
   CREATE TABLE mantis_config_table ( config_id VARCHAR(64) NOT NULL, project_id INTEGER NOT NULL DEFAULT 0, user_id INTEGER NOT NULL
   DEFAULT 0, access_reqd INTEGER DEFAULT 0, type INTEGER DEFAULT 90, value XS NOT NULL, PRIMARY KEY (config_id, project_id, user_id)
   )TYPE=MyISAM
   You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near
   'XS NOT NULL, PRIMARY KEY (config_id, project_id, user_id) )TYPE' at line 7

   Checks Failed...
   Please correct failed checks
   Retry


Can someone please let me know what I'm doing wrong!

Thanks!

H.
Hamster
 
Posts: 6
Joined: Jul 01, 2007 3:58 pm

Postby mantis_china » Jul 02, 2007 9:09 pm

I think, because the file you create dateabase is not Suitable for the mysql version.
mantis_china
 
Posts: 13
Joined: Jul 02, 2007 8:56 pm

Postby Olaf » Jul 05, 2007 9:20 am

I have the same problem. Both on mySQL 4 and 5
Olaf
 
Posts: 1
Joined: Jul 05, 2007 9:18 am

Postby vboctor » Jul 09, 2007 9:17 am

You might want to check the patch at:
http://www.mantisbt.org/bugs/view.php?id=8125
http://www.mantisbt.org/bugs/view.php?id=8131

Let me know if it fixes your problem.
Migrate your MantisBT to the MantisHub Cloud
vboctor
Site Admin
 
Posts: 1286
Joined: Feb 13, 2005 5:11 pm
Location: Redmond, Washington

Postby koc » Jul 17, 2007 9:09 am

In my case, It went well.

mantis 1.0.8 (WinXP SP2 [XAMPP 1.6.2])
admin/schema.php

line 29
value XS NOTNULL -> value X2 NOTNULL

line 111,112,113
description XS NOTNULL, -> description X2 NOTNULL,
steps_to_reproduce XS NOTNULL, -> steps_to_reproduce X2 NOTNULL,
additional_information XS NOTNULL -> additional_information X2 NOTNULL

line 132
note XS NOTNULL -> note X2 NOTNULL

line 177
filter_string XS NOTNULL -> filter_string X2 NOTNULL

line 189
body XS NOTNULL -> body X2 NOTNULL

line 225
description XS NOTNULL -> description X2 NOTNULL

line 243
description XS NOTNULL, -> description X2 NOTNULL,

line 268
value XS NOTNULL", -> value X2 NOTNULL",

line 316
description XS NOTNULL -> description X2 NOTNULL
koc
 
Posts: 1
Joined: Jul 17, 2007 8:56 am
Location: Japan

Help to install mantisbt-1.0.8

Postby pva » Jul 22, 2007 5:18 am

I stumped with the same problem... Could anybody help me to understand installation?

From reading manual seems that installation after step mv <directoryname> mantis should continue in the web interface. And that was my first attempt to install which failed.

:arrow: First attempt. In admin/install.php for I provied Admin Username (to create Database), Admin Password (to create Database) with the root mysql user and password. Result:

Username (for Database) was not created while Database name (for Database) was, with empty tables. All failed and seems that the reason is

Code: Select all
POSSIBLE PROBLEM
Database user doesn't have access to the database ( Access denied for user 'mantis'@'localhost' (using password: YES) )


:arrow: Second attempt. I've created user mantisbt:
Code: Select all
GRANT ALL ON mantisbt.* TO mantisbt@localhost IDENTIFIED BY 'asdfokm';


and entered him in the install form together with valid password. I still provide Admin Username/Password to create tables.

Again database created, but proces fails on:
Code: Select all
Create Schema ( CreateTableSQL on mantis_config_table )

BAD
CREATE TABLE mantis_config_table ( config_id VARCHAR(64) NOT NULL, project_id INTEGER NOT NULL DEFAULT 0, user_id INTEGER NOT NULL DEFAULT 0, access_reqd INTEGER DEFAULT 0, type INTEGER DEFAULT 90, value XS NOT NULL, PRIMARY KEY (config_id, project_id, user_id) )TYPE=MyISAM
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'XS NOT NULL, PRIMARY KEY (config_id, project_id, user_id) )TYPE' at line 7


Yes, although mantisbt could connect to mysql db seems that this query has wrong syntax, as it fails even if I run from mysql client with root user.

BTW. If I press retry, I'll see another warning:
Code: Select all
POSSIBLE PROBLEM
Please ensure that your installation supports the new password scheme used in MySQL 4.1.0 and later. See http://dev.mysql.com/doc/mysql/en/password-hashing.html.


So how should I proceed. I suppose this could be php installation problem, but I do not see any php related errors... Is it possible to enable debugging somehow?

That's amd64 server with dev-db/mysql-5.0.42, dev-lang/php-5.2.2-r1, apache-2, and mantisbt-1.0.8.

vboctor, you mentioned two bugs, and there are some patches there, but could you, please, backport them to 1.0.8? It's hard without digging into code to understand what should I do... Where to apply this:
Code: Select all
537a538,539
> } else {
> $t_result = &$g_db->execute('set schema ' . $f_db_schema);


Should I? How to install mantisbt?
pva
 
Posts: 5
Joined: Jul 13, 2007 12:25 am

Postby vboctor » Jul 23, 2007 1:27 am

pva, the bugs I referred to above were introduced in 1.1.0a3, so they are not applicable to 1.0.8.

koc, why did you need to change XS to X2?
Migrate your MantisBT to the MantisHub Cloud
vboctor
Site Admin
 
Posts: 1286
Joined: Feb 13, 2005 5:11 pm
Location: Redmond, Washington

Postby pva » Jul 23, 2007 5:43 am

vboctor, but any hints how to proceed? Could you answer the question: Should I create mysql data base user by myself or manitsbt should do it for me. If yes, why should I provide root database password?

I'd like to note one important thing: I've tried to install mantisbt-1.0.7 and installation passes fine, while I have mentioned above problems with 1.0.8. So seem that there is regression along the way. Thank you for your work in any way.
pva
 
Posts: 5
Joined: Jul 13, 2007 12:25 am

Postby SeanBDurkin » Jul 24, 2007 2:30 am

pva, vboctor,


The schema that 1.0.8 is wrong. The install script uses ...
CREATE TABLE mantis_config_table (
config_id VARCHAR(64) NOT NULL,
project_id INTEGER NOT NULL DEFAULT 0,
user_id INTEGER NOT NULL DEFAULT 0,
access_reqd INTEGER DEFAULT 0,
type INTEGER DEFAULT 90,
value XS NOT NULL,
PRIMARY KEY (config_id, project_id, user_id)
)TYPE=MyISAM;

However this is wrong for MySQL. The problem is that MySQL does not know about the XS data type. The difference between 1.07 (working) and 1.0.8 (not working) is that 1.0.7 correctly uses the data type TEXT instead of XS.

pva, your question "Should I create mysql data base user by myself or manitsbt should do it for me?" is a good one. It high-lights the incompletness of the Mantis installation instructions. My guess is: create it yourself with sql: "CREATE DATABASE `mantis` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;"

Faithfully,
Sean B. Durkin
SeanBDurkin
 
Posts: 4
Joined: Jul 24, 2007 2:21 am

Postby pva » Jul 24, 2007 5:14 am

The following change introduced regression:

Code: Select all
--- /usr/share/webapps/mantisbt/1.0.7/htdocs/core/database_api.php      2007-05-11 15:09:18.000000000 +0400
+++ /usr/share/webapps/mantisbt/1.0.8/htdocs/core/database_api.php      2007-07-23 14:19:22.000000000 +0400
@@ -6,7 +6,7 @@
        # See the README and LICENSE files for details

        # --------------------------------------------------------
-       # $Id: database_api.php,v 1.46.6.1 2006/01/05 03:54:19 thraxisp Exp $
+       # $Id: database_api.php,v 1.46.6.1.4.1 2007/05/26 22:23:50 giallu Exp $
        # --------------------------------------------------------

        ### Database ###
@@ -16,7 +16,7 @@

        $t_core_dir = dirname( __FILE__ ).DIRECTORY_SEPARATOR;

-       require_once( $t_core_dir . 'adodb/adodb.inc.php' );
+       require_once( 'adodb/adodb.inc.php' );

        # An array in which all executed queries are stored.  This is used for profiling
        $g_queries_array = array();


If I revert it back, everything works.

vboctor, could you, please, comment anything here?
pva
 
Posts: 5
Joined: Jul 13, 2007 12:25 am

Postby pva » Aug 10, 2007 1:03 pm

*bump*

Any comments here? I can not bump mantisbt in gentoo while this bug (bug?) is in.
pva
 
Posts: 5
Joined: Jul 13, 2007 12:25 am

Postby pva » Aug 12, 2007 1:40 am

pva
 
Posts: 5
Joined: Jul 13, 2007 12:25 am

Please explain

Postby lpantos » Aug 18, 2007 8:14 pm

I understand that there is a problem and I"m getting the same error as others; I don't understand how to fix it...
can someone please tell me simply how to fix it!
lpantos
 
Posts: 16
Joined: Jan 24, 2007 11:51 am


Return to Help

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 11 guests