Checking & Reparing MySQL Script


#!/bin/bash

MySQL Status Summary
mysqladmin -u root -pthepasswd process status

Check Database Mydb
/etc/init.d/mysqld stop; cd /var/lib/mysql; myisamchk –silent –force mydb/*.MYI

Repair Mydb  
/etc/init.d/mysqld start; mysqlcheck -u root -pthepassed –auto-repair –check –optimize –databases mydb

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s