将SQL文件导入新的MariaDB数据库时出错



我从WAMP切换到WPN-XM作为我的本地开发设置。我了解到它使用MariaDB而不是MYSQL。服务已经设置好,MariaDB正在运行

我将旧的WAMP数据库导出为SQL文件。当我使用WPN-XM的phpmyadmin导入数据库时,我得到一个红色错误MYSQL已经消失了。???

所以我尝试从mysql客户端源c:/myfile导入。sql并导入,但我得到很多错误,如

ERROR 1231 (4200 at line 31613 in file 'c:/myfile.sql: variable 'character_set_client' can't be set to a value of 'null'
ERROR 1075 (42000) at line 31476 in file: 'c:nycgmc-dev.sql': Incorrect table definition; there can be only one auto column and it must be defined as a key
ERROR 1075 (42000) at line 31481 in file: 'c:nycgmc-dev.sql': Incorrect table definition; there can be only one auto column and it must be defined as a key
Query OK, 0 rows affected (0.05 sec)
Records: 0  Duplicates: 0  Warnings: 0
ERROR 1075 (42000) at line 31491 in file: 'c:nycgmc-dev.sql': Incorrect table definition; there can be only one auto column and it must be defined as a key
ERROR 1075 (42000) at line 31496 in file: 'c:nycgmc-dev.sql': Incorrect table definition; there can be only one auto column and it must be defined as a key
ERROR 1075 (42000) at line 31501 in file: 'c:nycgmc-dev.sql': Incorrect table definition; there can be only one auto column and it must be defined as a key
ERROR 1075 (42000) at line 31506 in file: 'c:nycgmc-dev.sql': Incorrect table definition; there can be only one auto column and it must be defined as a key
ERROR 1075 (42000) at line 31511 in file: 'c:nycgmc-dev.sql': Incorrect table definition; there can be only one auto column and it must be defined as a key
ERROR 1075 (42000) at line 31516 in file: 'c:nycgmc-dev.sql': Incorrect table definition; there can be only one auto column and it must be defined as a key

我也得到了很多应该在那里的东西,比如

Query OK, 7 rows affected (0.10 sec)

当我在phpMyAdmin中查看时,我看到所有的表,但许多是0字节的意思是没有内容,可能是由于错误。

我认为MySQL和MariaDB是差不多的,我应该能够从一个导入SQL文件到另一个。为什么简单的导出和导入会出现错误?

感谢您的帮助。

我能够简单地通过调整PHPMyAdmin中的导出SQL设置从Mysql导入到MariaDB。

我从默认语句更改,例如:

INSERT INTO tbl_name (col_A,col_B) VALUES (1,2,3), (4,5,6), (7,8,9)

:

INSERT INTO tbl_name VALUES (1,2,3)

似乎这是导致错误的问题。一旦我重新导出,它导入到Maria DB fine。

最新更新