gpt4 book ai didi

mysql - 如何更改 MySQL 上的存储引擎类型?

转载 作者:IT王子 更新时间:2023-10-29 00:38:50 24 4
gpt4 key购买 nike

我想使用 InnoDB 作为我所有表和数据库的存储引擎。是否可以运行命令来更改当前表的类型以使用 InnoDB 而不是 MyISAM?

另外,有没有办法将此设置为默认值,这样我就不必再这样做了?

最佳答案

更改现有表的存储引擎:

ALTER TABLE my_table ENGINE = InnoDB;

将 InnoDB 设置为默认值:

Normally, this is MyISAM, but you can change it by using the --default-storage-engine or --default-table-type server startup option, or by setting the default-storage-engine or default-table-type option in the my.cnf configuration file.

关于mysql - 如何更改 MySQL 上的存储引擎类型?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1780083/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com