การใช้งาน
- รันทุกครั้งหลังอัปเกรด MySQL
- ตรวจสอบ Incompatibility กับ Server ใหม่
- อัปเกรด System Tables ใน Schema mysql (Privileges, Capabilities ใหม่)
- อัปเกรด Performance Schema และ sys Schema
- ตรวจสอบ User Schemas
- หา Incompatibility -> Table Check -> Repair หากพบปัญหา
ขั้นตอน
- ตรวจสอบว่า Server กำลัง Run อยู่
- รัน
mysql_upgrade [options]อัปเกรด System Tables - Check/Repair ตาราง Schema อื่นๆ
- Stop และ Restart Server เพื่อให้การเปลี่ยนแปลงมีผล
หลาย Server Instances
ระบุ Connection Parameters ต่อ Server:
shell> mysql_upgrade --protocol=tcp -P 3306 [other_options] shell> mysql_upgrade --protocol=tcp -P 3307 [other_options] shell> mysql_upgrade --protocol=tcp -P 3308 [other_options]
Unix: --protocol=tcp บังคับ TCP/IP แทน Unix Socket