进入mysql数据库,选择使用的数据库,选择使用的数据表,执行相关命令;
1.进入mysql:
mysql -uroot -p
按提示输入密码。
2.选择数据库:这里以dz为例
use dz;
成功选择提示如下:
Database changed
3.选择要修复,检查,优化的数据表:这里以vp_wap为例
修复表:
repair table v9_wap;
成功后提示好下:
+-----------+--------+----------+----------+| Table | Op | Msg_type | Msg_text |+-----------+--------+----------+----------+| dz.v9_wap | repair | status | OK |+-----------+--------+----------+----------+1 row in set (0.05 sec)
检查表:
CHECK TABLE `v9_wap`;
成功后提示好下:
+-----------+-------+----------+----------+| Table | Op | Msg_type | Msg_text |+-----------+-------+----------+----------+| dz.v9_wap | check | status | OK |+-----------+-------+----------+----------+1 row in set (0.08 sec)
优化表:
OPTIMIZE TABLE `v9_wap`;
修复成功提示如下:
+-----------+----------+----------+----------+| Table | Op | Msg_type | Msg_text |+-----------+----------+----------+----------+| dz.v9_wap | optimize | status | OK |+-----------+----------+----------+----------+1 row in set (0.04 sec)