There was a problem loading the comments.

How do I optimize a mysql database table via command line?

Support Portal  »  Knowledgebase  »  Viewing Article

  Print
To optimize a mysql database table via command line you will need to ssh into your server as the root user and enter into the mySQL command line interface by typing "mysql". This will give you the following prompt.

mysql>

Once you are at a mySQL command prompt you will need to type the following. The first selects the database you wish to use and the second optimizes the table(s).

mysql> USE your_database;
Database changed


mysql> OPTIMIZE TABLE `table1` , `table2` , `table3` , `table4`;


Share via
Did you find this article useful?  

Related Articles

© ServerFreak Technologies Sdn Bhd