Roundcube Community Forum

 

RoundMail & MySQL

Started by Michellea, April 30, 2009, 03:49:47 PM

Previous topic - Next topic

Michellea

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

jpgrace

Could you cut an paste the error from the log?

Michellea

Hi,

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

Michellea

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.

uberlemurguy

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 */