mysql报错
[ERROR] Slave SQL: Error 'The table 'pin_flow' is full' on query. Default database: 'mobile_flow'. Query: 'UPDATE mobilemsg_flow.pin_flow
处理:
#!/bin/bash
tbname=`mysql --login-path=localhost -e "show slave status \G" | grep full | head -1 | awk '{print $15}'`
repair(){
echo "error table: $tbname"
echo "repair table $tbname.........."
mysql --login-path=localhost -e "check table $tbname;"
mysql --login-path=localhost -e "stop slave;start slave;"
sleep 3
tbname=`mysql --login-path=localhost -e "show slave status \G" | grep full | head -1 | awk '{print $15}'`
echo "error table: $tbname"
}
until [ -z "$tbname" ]
do
repair
done
echo "there no full error table;"