【发布时间】:2014-05-09 19:43:27
【问题描述】:
我正在从 WAMP 切换到 WPN-XM 作为我的本地开发设置。我了解到它使用 MariaDB 而不是 MYSQL。服务已设置,MariaDB 正在运行。
我将旧 WAMP 数据库导出到 SQL 文件中。当我使用 WPN-XM 的 phpmyadmin 导入数据库时,我得到一个红色错误 MYSQL has gone away。 ???
所以我尝试从 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 中查看时,我看到了所有表格,但很多都是 o 字节,表示没有内容,可能是由于错误。
我认为 MySQL 和 MariaDB 几乎相同,我应该能够将 SQL 文件从一个导入另一个。为什么我在进行简单的导出和导入时会出错?
任何帮助表示赞赏。
【问题讨论】:
-
好的,我通过谷歌搜索发现你不能从我的 MYSQL 5.36 转到我的新 MariaDB 5.536,因为版本必须相同。它们必须是相同的版本,否则定义会不同。这就是为什么我得到错误。使。因此,除非有更好的主意,否则我会想办法将我的 WAMP 的 MYSQL 升级到 5.5.36。
-
我一直认为 SQL 是一种标准,可以将数据从一个版本移动到另一个版本,我猜不是。
-
我实际上是从 MYSQL 5.5.16 升级到 MariaDB 5.5.36。在某个地方,我的 WAMP 现在似乎是 5.5.16 版,不知道这是怎么发生的。似乎足够接近的版本不会导致这么多错误