———————-「 特定DB内のテーブルをチェック 」———————–
++++ OK: MYISAM , INNODB
++++ NG: MEMORY

[root@colinux ~]# mysqlcheck --check DB01 -u root -p
Enter password:
DB01.TABLE007 OK
DB01.TABLE008 OK
DB01.TABLE009 OK
[root@colinux ~]#

[root@colinux ~]# mysqlcheck --check DB01 TABLE007 -u root -p
Enter password:
DB01.TABLE007 OK
[root@colinux ~]#

——————————————————————————————-

———————-「DB内のテーブルをOPTIMIZE 」———————–
++++ OK: MYISAM , INNODB
++++ NG: MEMORY

[root@colinux ~]# mysqlcheck --optimize --all-databases -u root -p
Enter password:
[root@colinux ~]#

DB01.TABLE007
note : Table does not support optimize, doing recreate + analyze instead
status : OK
DB01.TABLE008
note : Table does not support optimize, doing recreate + analyze instead
status : OK
DB01.TABLE009
note : Table does not support optimize, doing recreate + analyze instead
status : OK
DB02.animals Table is already up to date
DB02.animals02 Table is already up to date
TEST.Y2008_Y2009
note : The storage engine for the table doesn’t support optimize
TEST.Y2009 Table is already up to date
client_test_db.bug2247 Table is already up to date
client_test_db.foo_dfr Table is already up to date
client_test_db.my_demo_transaction

■INNODBに関しては、制限がある。
[root@colinux ~]# mysqlcheck --optimize DB01 TABLE007 -u root -p
Enter password:

DB01.TABLE007
note : Table does not support optimize, doing recreate + analyze instead
status : OK
[root@colinux ~]#

——————————————————————————————-

———————-「DB内のテーブルをREPAIR 」———————–
++++ OK: MYISAM
++++ NG: INNODB,MEMORY

■MYISAMは可能
[root@colinux ~]# mysqlcheck --repair TEST MYSQLIMP -u root -p
Enter password:

TEST.MYSQLIMP OK
[root@colinux ~]#

■INNODBはサポート外
[root@colinux ~]# mysqlcheck --repair DB01 -u root -p
Enter password:

DB01.TABLE007
note : The storage engine for the table doesn’t support repair
DB01.TABLE008
note : The storage engine for the table doesn’t support repair
DB01.TABLE009
note : The storage engine for the table doesn’t support repair
[root@colinux ~]#

Comments are closed.

Post Navigation