You are not logged in.
Pages: 1
Topic closed
Hello!
I'm trying to setup dbmail with mariasb, and run into a problem importing the tables from sql file shipped with the package.
mysql -u dbmail dbmail -p < /usr/share/dbmail/mysql/create_tables.mysql
Enter password: ******
ERROR 1005 (HY000) at line 401: Can't create table `dbmail`.`dbmail_auto_replies` (errno: 121 "Duplicate key on write or update")
Here is the query that fails:
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;
I've tried it with mysql 5.5.46, on the other system, and it worked fine. Isn't mariadb supposed to be a drop-in replacement for mysql? And if not, can someone point out what is wrong with this query and how to adapt it to mariadb?
Last edited by Axon (2015-10-31 20:13:59)
Offline
Are you sure the foreign key is unique within your database?
All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.
Offline
Yeah, I actually solved it already. The key is not unique and why mysql ignores that fact is a mistery. I'm gonna report this to upstream and close this thread.
Offline
Hello Axon,
I have the same problem if I create the table of dbmail (Duplicate key...).
You had written you had solved the problem, but you don't have write, what you had done.
Coud you tell me what you had made to solve this problem, please?
Thanks and greetings
Ralph
Offline
Either manually change the key or go complain to dbmail that they are using a duplicate key in their dump, it's pretty clearly stated here.
Please refrain from necrobumping solved threads, create your own if you require assistance.
https://wiki.archlinux.org/index.php/Co … bumping.22
Closing.
Offline
Pages: 1
Topic closed