1.问题
MySQL5.7设置innodb_undo_tablespaces = 2 报错如下:
2020-06-09T04:40:07.800321-05:00 0 [ERROR] InnoDB: Expected to open 2 undo tablespaces but was able to find only 0 undo tablespaces. Set the innodb_undo_tablespaces parameter to the correct value and retry. Suggested value is 0
2.原因:
innodb_undo_tablespaces 参数只能在初始化的时候设置,而不能在后续使用过程中修改。详见【MySQL】undo
3.改进:
MySQL5.7中,虽然支持独立表空间,但是默认还是在ibdata1中,与系统表空间共用。
而在MySQL8.0中就默认开启独立undo表空间了。见【MySQL8.0】undo