gpt4 book ai didi

mysql - 移动到 innodb_file_per_table 后如何缩小 ibdata1 文件大小?

转载 作者:行者123 更新时间:2023-11-29 05:15:24 24 4
gpt4 key购买 nike

我已成功按照此线程 (https://dba.stackexchange.com/questions/8982/what-is-the-best-way-to-reduce-the-size-of-ibdata-in-mysql) 中的说明进行操作,但 2 个月后 ibdata1 继续增长。我试过优化表,但它没有回收丢失的存储空间。如何缩小 ibdata1 文件大小?有什么方法可以安全删除吗?

最佳答案

As you want to reclaim the space from ibdata1 you actually have to delete the file:

  1. Do a mysqldump of all databases, procedures, triggers etc except the mysql and performance_schema databases
  2. Drop all databases except the above 2 databases
  3. Stop mysql
  4. Delete ibdata1 and ib_log files
  5. Start mysql
  6. Restore from dump

Source

关于mysql - 移动到 innodb_file_per_table 后如何缩小 ibdata1 文件大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33604647/

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