檢查並最佳化 MySQL
.K.T. | 2009 年 06 月 04 日 | 下午 6:11今天在網路上看到的
來做個筆記吧!
MySQL 提供二個工具檢查 DB
一個是 mysqlcheck
另一個則是 myisamchk
不過
這次我用的是 mysqlcheck
因為 mysqlcheck 可以在不關閉 MySQL 服務下執行
只要在 MySQL Server 上下這個指令
mysqlcheck -a -c -o -r --all-databases
其中
-a = Analyse given tables
-c = Check table for errors
-o = Optimise table
-r = Can fix almost anything except unique keys that are not unique
這樣就可以檢查並最佳化 MySQL Server 囉!
對了
還要記得加上 -u "使用者" 和 -p "密碼"
不然可能會無法執行喔!






