Database restore errors Dolibarr 20.0.3 / Ubuntu 24 / MyPHPAdmin

Moving Dolibarr from DoliWamp (Windows) based system to Ubuntu (Linux) workstation. I have been unable to restore the database using the provided mysql command line shown in the restore wizard. Was able to install phpMyAdmin. When attempting to restore DB database using phpMyAdmin I’m seeing the following errors. Any help would be appreciated.

on the CREATE TABLE line there is a (

but I can not find the corresponding )

It exists further down in the code. This table is the first one, at the very beginning of the SQL dump.

DROP TABLE IF EXISTS llx_accounting_account;
/*!40101 SET @saved_cs_client = @@character_set_client /;
/
!40101 SET character_set_client = utf8 /;
CREATE TABLE llx_accounting_account (
rowid bigint(20) NOT NULL AUTO_INCREMENT,
entity int(11) NOT NULL DEFAULT 1,
datec datetime DEFAULT NULL,
tms timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
fk_pcg_version varchar(32) COLLATE utf8mb3_unicode_ci NOT NULL,
pcg_type varchar(60) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
account_number varchar(32) COLLATE utf8mb3_unicode_ci NOT NULL,
account_parent int(11) DEFAULT 0,
label varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL,
labelshort varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
fk_accounting_category int(11) DEFAULT 0,
fk_user_author int(11) DEFAULT NULL,
fk_user_modif int(11) DEFAULT NULL,
active tinyint(4) NOT NULL DEFAULT 1,
reconcilable tinyint(4) NOT NULL DEFAULT 0,
import_key varchar(14) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
extraparams varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL,
PRIMARY KEY (rowid),
UNIQUE KEY uk_accounting_account (account_number,entity,fk_pcg_version),
KEY idx_accounting_account_fk_pcg_version (fk_pcg_version),
KEY idx_accounting_account_account_parent (account_parent),
CONSTRAINT fk_accounting_account_fk_pcg_version FOREIGN KEY (fk_pcg_version) REFERENCES llx_accounting_system (pcg_version)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
/
!40101 SET character_set_client = @saved_cs_client */;

du you use mysql or mariadb?

MariaDB but I don’t think it matters? Mysql commands execute the same, as far as I know.

I attempted to run the import from command line and receive same error.

In MariaDB I ran command “SHOW ENGINE INNODB STATUS;” and received the following:

I’ll add that I am exporting the database from a DoliWamp windows environment to Ubuntu. Not sure if that is the issue.

Looks like their may be some differences in the database environments:

Windows machine:

Ubuntu machine:

Further inspection reveals the tables differ between Windows / Ubuntu environments. Suspect this may be the problem?

Windows:

Ubuntu:

I am pretty sure it is possible to convert between the charset formats, but you might want to consult a database manual.

I also use mariadb, but I have not used windows for a long time

PROBLEM SOLVED!!!

It was indeed the additional table from the Windows system export that was throwing off the Linux import. I manually edited the SQL file using Notepad++ and removed the erroneous table entry. It then imported via command line with no issues.