[rt-devel] rt-setup-database issues

Bob Tanner tanner at real-time.com
Mon Oct 13 18:15:19 EDT 2003


Redhat-7.3
perl-5.6.1
rt-3.0.4
mysql-3.23.58

Ok, let's initialize the database:

# rt-setup-database --action init --dba <snip> --prompt-for-dba-password
<snip>
Password: <snip>

Now creating a database for RT.
Creating mysql database rt3.
Now populating database schema.
Creating database schema.
DBD::mysql::st execute failed: Table 'Attachments' already exists at 
/usr/sbin/rt-setup-database line 153, <SCHEMA_LOCAL> line 416.
Problem with statement:

CREATE TABLE Attachments (
  id INTEGER NOT NULL  AUTO_INCREMENT,
  TransactionId integer NOT NULL  ,
  Parent integer NOT NULL DEFAULT 0  ,
  MessageId varchar(160) NULL  ,
  Subject varchar(255) NULL  ,
  Filename varchar(255) NULL  ,
  ContentType varchar(80) NULL  ,
  ContentEncoding varchar(80) NULL  ,
  Content LONGTEXT NULL  ,
  Headers LONGTEXT NULL  ,
  Creator integer NOT NULL DEFAULT 0  ,
  Created DATETIME NULL  ,
  PRIMARY KEY (id)
) TYPE=InnoDB

Table 'Attachments' already exists at /usr/sbin/rt-setup-database line 154, 
<SCHEMA_LOCAL> line 416.

Ok, let's try again, but the old fashion way.

# rt-setup-database --action drop --dba <snip> --prompt-for-dba-password
Password: <snip>
bout to drop mysql database rt3 on localhost.
WARNING: This will erase all data in rt3.

Proceed [y/N]:y
Dropping mysql database rt3.

# mysqladmin -u <snip> -p <snip> create rt3
# mysql -u <snip> -p rt3

mysql> CREATE TABLE Attachments ( <snip>
Query OK, 0 rows affected (0.01 sec)
mysql> CREATE INDEX Attachments1 ON Attachments (Parent) ;
mysql> CREATE INDEX Attachments2 ON Attachments (TransactionId) ;
mysql> CREATE INDEX Attachments3 ON Attachments (Parent, TransactionId) ;
<snip>

No problems. So, I think the problem is in the rt-setup-database script.





-- 
Bob Tanner <tanner at mn-linux.org>          | Phone : (952)943-8700
http://www.mn-linux.org, Minnesota, Linux | Fax   : (952)943-8500
Key fingerprint = AB15 0BDF BCDE 4369 5B42  1973 7CF1 A709 2CC1 B288



More information about the Rt-devel mailing list