Mail.Go.TH : Grand Opening วิธีการดูแลรักษา ยางปิงปอง
Jun 21

ใช้ mysqltuner แล้วพบว่า จำเป็นต้อง optimize tables แต่จะทำไงให้ optimize ได้ทุกตารางล่ะ

ใช้คำสั่งนี้ได้เลยครับ

mysqlcheck -Aao --auto-repair -u root -p[password]

-a, –analyze [Analyze given tables]
-o, –optimize [Optimize table]
-A, –all-databases [Check all the database]
–auto-repair [If a checked table is corrupted, automatically fix it. Repairing will be done after all tables have been checked, if corrupted ones were found]

หรือ จะใช้

mysqlcheck -uroot -p -ro –all-databases 

-r = Can fix almost anything except unique keys that are not unique.

ก็จะสำเร็จเสร็จเรียบร้อย ที่เหลือก็แล้วแต่ปรับแต่งนะครับ

written by Mr-San \\ tags: ,


Comments are closed.