7. 配置undo表空间

mac2022-06-30  91

7. 配置undo表空间

undo日志可以存储在一个或多个undo表空间中,无需存储在系统表空间中。 要为MySQL实例配置单独的undo表空间,请执行以下步骤

【重要】: 只能在初始化新MySQL实例时配置undo表空间的数量,因为该 innodb_undo_tablespaces选项只能在初始化时设置。指定的设置在MySQL实例的生命周期内是固定的。

【注意】: innodb_undo_tablespaces 已弃用,将在以后的版本中删除。

配置参数innodb_undo_directory用来指定undo表空间位置。如果为指定,默认是在MySQL数据目录中创建。 mysql> show variables like 'innodb_undo_directory'; +-----------------------+---------+ | Variable_name | Value | +-----------------------+---------+ | innodb_undo_directory | undolog | +-----------------------+---------+ 1 row in set (0.00 sec)

配置参数innodb_rollback_segments用来定义回滚段的数量。默认值为128,也是最大值。

配置参数innodb_undo_tablespaces定义undo表空间的数量。

转载于:https://www.cnblogs.com/wanbin/p/9514657.html

最新回复(0)