Logo Background

Analyze, Repair And Optimize MySQL Database

  • By on August 22, 2008 | No Comments

    The script below intends to analyze the table in MySQL database. Besides that, it will also optimize and runs a repair check on the table. You may put the script as below as an .sh file.

    db=;
    user=;
    pass=;
     
    #Optimize DB
    mysqlcheck -o $db -u $user -p $pass
     
    #Analyze DB
    mysqlcheck -a $db -u $user -p $pass
     
    #Repair DB
    #mysqlcheck -r $db -u $user -p $pass
    Previous
    Next
    » Backup Script For Linux-Apache-PHP-MySQL
Leave a Comment