无法导出远程数据库:在字段列表中未知列 ‘generation_expression’。

huangapple go评论134阅读模式
英文:

Suddenly cannot dump remote database: Unknown column 'generation_expression' in 'field list'

问题

抱歉,我明白你不想得到回答。以下是你要求的内容的翻译:

"我一直能够使用CLI中的mariadb-dump来导出我的远程数据库。但从今天开始,我突然遇到了以下错误:

mysqldump: 无法执行
'从信息架构.列中选择列名、额外信息、生成表达式、数据类型
其中表架构=数据库()
并且表名='<my-table>'的: 
在'字段列表'中未知的列'generation_expression' (1054)

我检查了服务器的信息架构,确实缺少generation_expression列。它在我打算导出的本地测试服务器上存在。mariadb-dump的版本为Ver 10.19 Distrib 10.11.2-MariaDB,适用于Linux (x86_64),而服务器版本为MySQL 5.6。

我在互联网和StackOverflow上找不到相关的问题。我查找了一下,似乎generation_expression只在版本5.7中引入。但我不太可能升级到5.7版本的服务器。尽管如此,我本来希望不需要升级,因为以前一直能够正常使用导出工具。

我考虑重新安装mariadb,但这需要很多时间和精力,而且可能无法解决问题。

编辑:我刚刚重新安装了数据库服务器并清除了所有数据(首先进行了备份),但仍然遇到相同的错误。"

英文:

I've always been able to dump my remote database using mariadb-dump from the CLI. Starting today, I suddenly got the following error

mysqldump: Couldn&#39;t execute 
&#39;select column_name, extra, generation_expression, data_type 
from information_schema.columns 
where table_schema=database() 
and table_name=&#39;&lt;my-table&gt;&#39;&#39;: 
Unknown column &#39;generation_expression&#39; in &#39;field list&#39; (1054)

I checked the server information schema, and indeed the column generation_expression is missing. It is present on my local test server that I intend to dump to. The mariadb-dump version is Ver 10.19 Distrib 10.11.2-MariaDB, for Linux (x86_64), and the server version is MySQL 5.6.

I could not find any related problems on the internet or stackoverflow. I looked around and it appears that the generation_expression is introduced only in version 5.7. I cannot feasibly do a server upgrade to 5.7. I would expect this isn't needed though, the dump tool has always worked fine before.
I'm considering doing a full reinstall of mariadb, but this takes a lot of time and effort, and might not solve the issue.

Edit: I just reinstalled the database server and cleaned all the data (with backing up first), and I am still getting the same error.

答案1

得分: 6

这在MariaDB 10.11中已经发生了改变(参见MDEV-16029和这个提交)。

因此,您应该要么降级您的MariaDB客户端工具(使用10.10或更低版本),要么使用MySQL客户端工具。在过去的10年里,MariaDB和MySQL已经分道扬镳,因此不能保证在使用MySQL客户端工具与MariaDB服务器时转储操作会正确执行。

还要考虑升级您的MySQL安装。MySQL 5.6已经在几年前达到了终止支持(EOL)状态。

英文:

This has changed in MariaDB 10.11 (see MDEV-16029 and this commit).

So you should either downgrade your MariaDB client tools (10.10 or below) or to use the MySQL client tools. Over the last 10 years MariaDB and MySQL have diverged, so there is no guarantee that the dump will work correctly when using MySQL client tools with MariaDB server.

Also consider to upgrade your MySQL installation. MySQL 5.6 has reached EOL several years ago.

huangapple
  • 本文由 发表于 2023年3月7日 20:39:00
  • 转载请务必保留本文链接:https://go.coder-hub.com/75662086.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定