On 12/10/17 04:33, Ralph Ballier wrote: > > ----- Nachricht von Sandino Araico Sánchez <[email protected] > <mailto:[email protected]>> --------- > Datum: Thu, 12 Oct 2017 04:00:17 -0500 > Von: Sandino Araico Sánchez <[email protected] > <mailto:[email protected]>> > Antwort an: DBMail mailinglist <[email protected] > <mailto:[email protected]>> > Betreff: Re: [Dbmail] Installations problems with dbmail 3.2.3 > An: DBMail mailinglist <[email protected] > <mailto:[email protected]>>, Ralph Ballier <[email protected] > <mailto:[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? > I mean look for two records with the same user_idnr in table dbmail_users; when found delete one of them and keep the other. If table dbmail-users is empty and you keep receiving this error 1005 you might have a corrupted database. > > > 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
-- Sandino Araico Sánchez http://sandino.net
_______________________________________________ DBmail mailing list [email protected] http://lists.nfg.nl/mailman/listinfo/dbmail
