Re: Installations problems with dbmail 3.2.3
Andrea Brancatelli <[email protected]> Thu, 12 Oct 2017 13:08:09 +0200
| Newsgroups | gmane.mail.imap.dbmail |
|---|---|
| Organization | Schema31 s.r.l. |
| Message-ID | <[email protected]> |
Dear Ralph. I strongly suggest you to use dbmailt 3.2.x and not 3.1.x which is a dead branch. We've been using dbmail 3.2.x since almost two years hosting thousands (as of now, 48962 exactly) mailboxes without a glitch on MySQL 5.6. I never used MariaDB but I prefer to stick on officially supported software, especially with new MySQL's roadmap. As for your problem with those tables, it's pretty strange you have problem with the init SQL as I recall it to be pretty straightforward... Anyhow, that's the definition for those two tables: CREATE TABLE `dbmail_auto_replies` ( `user_idnr` bigint(20) unsigned NOT NULL DEFAULT '0', `start_date` datetime NOT NULL, `stop_date` datetime NOT NULL, `reply_body` mediumtext, KEY `user_idnr_index` (`user_idnr`), CONSTRAINT `dbmail_auto_replies_ibfk_1` FOREIGN KEY (`user_idnr`) REFERENCES `dbmail_users` (`user_idnr`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `dbmail_auto_notifications` ( `user_idnr` bigint(20) unsigned NOT NULL, `notify_address` varchar(100) NOT NULL DEFAULT '', KEY `user_idnr_index` (`user_idnr`), CONSTRAINT `dbmail_auto_notifications_ibfk_1` FOREIGN KEY (`user_idnr`) REFERENCES `dbmail_users` (`user_idnr`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; --- Andrea Brancatelli Schema31 S.p.a. Chief Technology Officier ROMA - FI - PA ITALY Tel: +39.06.98.358.472 Cell: +39.331.2488468 Fax: +39.055.71.880.466 Società del Gruppo OVIDIO TECH S.R.L. On 2017-10-12 11:33, Ralph Ballier wrote: > ----- Nachricht von Sandino Araico Sánchez <[email protected]> --------- > Datum: Thu, 12 Oct 2017 04:00:17 -0500 > Von: Sandino Araico Sánchez <[email protected]> > Antwort an: DBMail mailinglist <[email protected]> > Betreff: Re: [Dbmail] Installations problems with dbmail 3.2.3 > An: DBMail mailinglist <[email protected]>, Ralph Ballier <[email protected]> > > [..............] > >>> Thanks for your answer. > >>> I now use 3.1.17. There is the same error message while set up the tables using "create_tables.mysql": > >>> ERROR 1005 (HY000) at line 401: Can't create table `dbmail`.`dbmail_auto_replies` (errno: 121 "Duplicate key on write or update") > >>> MySQL error 1005 is an incorrect foreign key. In this case a duplicate key in dbmail_users.user_idnr. > >> You must fix all duplicate keys in dbmail_users (there might be more than one) before table dbmail_auto_replies can be created . > > Yes, you are right. I find two identical lines in "CREATE TABLE dbmail_auto_notifications" and in "CREATE TABLE dbmail_auto_replies" (see below). > > But what do you mean with "fix it"? Shall I delete the words FOREIGN KEY? If yes, in the first or in the second CREATE statement? Or in both? > > Thanks > > Ralph > CREATE TABLE dbmail_auto_notifications ( > user_idnr bigint(20) UNSIGNED NOT NULL, > notify_address varchar(100) NOT NULL default '', > INDEX user_idnr_index (user_idnr), > FOREIGN KEY USER_IDNR_FK (USER_IDNR) > REFERENCES dbmail_users (user_idnr) ON DELETE CASCADE ON UPDATE CASCADE > ) ENGINE InnoDB DEFAULT CHARSET=utf8; > > DROP TABLE IF EXISTS dbmail_auto_replies; > CREATE TABLE dbmail_auto_replies ( > user_idnr bigint(20) UNSIGNED DEFAULT '0' NOT NULL, > start_date DATETIME NOT NULL, > stop_date DATETIME NOT NULL, > reply_body MEDIUMTEXT, > INDEX user_idnr_index (user_idnr), > FOREIGN KEY USER_IDNR_FK (USER_IDNR) > REFERENCES dbmail_users (user_idnr) ON DELETE CASCADE ON UPDATE CASCADE > ) ENGINE InnoDB DEFAULT CHARSET=utf8; > >> > > _______________________________________________ > DBmail mailing list > [email protected] > http://lists.nfg.nl/mailman/listinfo/dbmail _______________________________________________ DBmail mailing list [email protected] http://lists.nfg.nl/mailman/listinfo/dbmail