Jun 21
ใช้ mysqltuner แล้วพบว่า จำเป็นต้อง optimize tables แต่จะทำไงให้ optimize ได้ทุกตารางล่ะ
ใช้คำสั่งนี้ได้เลยครับ
[code lang='bash']mysqlcheck -Aao --auto-repair -u root -p[password][/code]
-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]
หรือ จะใช้
[code lang='bash']mysqlcheck -uroot -p -ro –all-databases [/code]
-r = Can fix almost anything except unique keys that are not unique.
ก็จะสำเร็จเสร็จเรียบร้อย ที่เหลือก็แล้วแต่ปรับแต่งนะครับ


