Author Topic: RoundMail & MySQL  (Read 4873 times)

Offline Michellea

  • Newbie
  • *
  • Posts: 4
RoundMail & MySQL
« on: April 30, 2009, 03:49:47 PM »
Hi,

I am looking at migrating to RoundMail from SquirrelMail and have had an issue setting up RoundMail. I have MySQL version 4.0.26 installed and when I attempt to run the initial SQL script, it returns the error that it is unable to create many of the tables. Can someone please help? Thanks

Offline jpgrace

  • Jr. Member
  • **
  • Posts: 10
RoundMail & MySQL
« Reply #1 on: April 30, 2009, 04:01:31 PM »
Could you cut an paste the error from the log?

Offline Michellea

  • Newbie
  • *
  • Posts: 4
RoundMail & MySQL
« Reply #2 on: April 30, 2009, 05:59:16 PM »
Hi,

Unfortunately I don't have access to the logs. The error I get is that for example the contacts table cannot be created.

Offline Michellea

  • Newbie
  • *
  • Posts: 4
RoundMail & MySQL
« Reply #3 on: May 01, 2009, 06:13:02 AM »
I get the following error.

 SQL query:

-- Table structure for table `contacts`
CREATE TABLE `contacts` (
`contact_id` int( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
`changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
`del` tinyint( 1 ) NOT NULL DEFAULT '0',
`name` varchar( 128 ) NOT NULL ,
`email` varchar( 128 ) NOT NULL ,
`firstname` varchar( 128 ) NOT NULL ,
`surname` varchar( 128 ) NOT NULL ,
`vcard` text NULL ,
`user_id` int( 10 ) UNSIGNED NOT NULL DEFAULT '0',
PRIMARY KEY ( `contact_id` ) ,
CONSTRAINT `user_id_fk_contacts` FOREIGN KEY ( `user_id` ) REFERENCES `users` ( `user_id` ) /*!40008 ON DELETE CASCADE ON UPDATE CASCADE */
)/*!40000 ENGINE=INNODB *//*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */

MySQL said: Documentation
#1005 - Can't create table '.\roundcubemail\contacts.frm' (errno: 150)

I did managed to run the script by executing it against MySQL 5 and then export the SQL file and executing that file against MySQL 4.20.26.

Offline uberlemurguy

  • Newbie
  • *
  • Posts: 4
RoundMail & MySQL
« Reply #4 on: May 06, 2009, 11:02:21 PM »
try removing UNSIGNED from "`user_id` int( 10 ) UNSIGNED NOT NULL DEFAULT '0',"

it should look like this:
Quote
-- Table structure for table `contacts`
CREATE TABLE `contacts` (
`contact_id` int( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT ,
`changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
`del` tinyint( 1 ) NOT NULL DEFAULT '0',
`name` varchar( 128 ) NOT NULL ,
`email` varchar( 128 ) NOT NULL ,
`firstname` varchar( 128 ) NOT NULL ,
`surname` varchar( 128 ) NOT NULL ,
`vcard` text NULL ,
`user_id` int( 10 ) NOT NULL DEFAULT '0',
PRIMARY KEY ( `contact_id` ) ,
CONSTRAINT `user_id_fk_contacts` FOREIGN KEY ( `user_id` ) REFERENCES `users` ( `user_id` ) /*!40008 ON DELETE CASCADE ON UPDATE CASCADE */
)/*!40000 ENGINE=INNODB *//*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */