我想重命名索引。 我查看了alter table文档,但是我无法弄清楚简单地重命名索引的语法。 当通过MySQL GUI进行操作时,它会丢弃索引,并创建一个新的索引。 虽然这样做,我想避免重建整个索引,只是为了更改索引的名称。
[附加信息]
在alter table文档中说明
只能修改表元数据而不是表数据的更改可以通过更改表的.frm文件而不是触摸表内容立即进行。 以下更改是可以通过以下方式进行的快速更改:
* Renaming a column or index.
但是,当我尝试通过编辑.frm文件(在测试数据库上)并重新启动服务器来重命名索引时,它现在在尝试列出列时声明“无法获取列”,并且在尝试运行时一个查询,它返回错误“Unknown table engine”“”。 .frm文件有很多二进制内容。 是否有一个很好的工具来编辑二进制信息。
I would like to rename an index. I've looked at the alter table documentation, but I can't figure out the syntax to simply rename an index. When doing it through the MySQL GUI, it drops the index, and creates a new one. While this works, I would like to avoid rebuilding the entire index just to change the name of an index.
[ADDITIONAL INFO]
In the alter table documentation it states
Alterations that modify only table metadata and not table data can be made immediately by altering the table's .frm file and not touching table contents. The following changes are fast alterations that can be made this way:
* Renaming a column or index.
However, when I tried to rename the index by editing the .frm file (on a test database) and restarting the server, it now states "Could not fetch columns" in the UI when trying to list the columns, and when trying to run a query, it returns the error "Unknown table engine ''". The .frm file has a lot of binary content. Is there a good tool for editing the binary info.
更多推荐
发布评论