背景mysql5.7實例出現誤操作刪除了performance_schema和sys庫
恢復方案使用mysql_upgrade命令操作恢復
直接執行mysql_upgrade -u -p 修復
查看官檔mysql_upgrade 命令執行會做檢查和修復動作,這個會吧刪除的系統庫修復
If mysql_upgrade finds that a table has a possible incompatibility, it performs a table check and, if problems are found, attempts a table repair.
https://dev.mysql.com/doc/refman/5.7/en/mysql-upgrade.html