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