problems with my sql

Issue #81 closed
Jack van Liempt created an issue

I can’t install the mysql.intial.SQL. I am using MariaDB 10.5.12 and indent_switch 4.3 (dev-master). I need to install/import the mysql.initial.sql. I tried from within MariaDB with the source command and phpmyadmin to import this to the roundcube database. And i got some error which I can’t correct. Can you help me to resolve this error?

  1. Unexpected beginning of statement. (near "1" at position 355)
  2. Unexpected beginning of statement. (near "`label`" at position 360)
  3. Unrecognized statement type. (near "varchar" at position 370)

SQL-query: Kopiëren

CREATE TABLE IF NOT EXISTS `ident_switch` ( `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, `user_id` int(10) UNSIGNED NOT NULL, `iid` int(10) UNSIGNED NOT NULL, `username` varchar(64), `password` varchar(64), `imap_host` varchar(64), `imap_port` int CHECK(`imap_port` > 0 AND `imap_port` <= 65535), `imap_delimiter` char(1), `label` varchar(32), `flags` int NOT NULL DEFAULT 0, `smtp_host` varchar(64), `smtp_port` int CHECK(`smtp_port` > 0 AND `smtp_port` <= 65535), `smtp_auth` smallint NOT NULL DEFAULT 1, `drafts_mbox` varchar(64), `sent_mbox` varchar(64), `junk_mbox` varchar(64), `trash_mbox` varchar(64), UNIQUE KEY `user_id_label` (`user_id`, `label`), CONSTRAINT `fk_user_id` FOREIGN KEY (`user_id`) REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `fk_identity_id` FOREIGN KEY (`iid`) REFERENCES `identities`(`identity_id`) ON DELETE CASCADE ON UPDATE CASCADE, PRIMARY KEY(`id`), INDEX `IX_ident_switch_user_id`(`user_id`), INDEX `IX_ident_switch_iid`(`iid`) )

MySQL meldt:

#1005 - Kan tabel `roundcube`.`ident_switch` niet aanmaken (Errcode: 121 "Duplicate key on write or update")

Comments (2)

  1. Log in to comment