How to change the database engine of a MySQL database table?

Started by Dipak Bhoi, June 29, 2014, 07:16:02 PM

Previous topic - Next topic

Dipak Bhoi

Hello guys,

In this post I will help you how to change the database engine of a MySQL table.

Suppose that you have a database table called your_table currently using MyISAM engine and you wish to change the engine from MyISAM to InnoDB via SSH. Below are the steps.

1. Get the access of your server with root user via SSH.
2. Login to the MySQL server from the command line with the following command:

Quote#mysql -u root -p

You will get the " mysql> " prompt, the MySQL query that will be used is:

Select the database.
Quotemysql> use your_database_name;

Run below query.
Quotemysql>ALTER TABLE your_table ENGINE = InnoDB;
Quote
mysql> exit

Hey you have done !!

Enjoy !!!

MilesWeb - 30-Day Money Back
cPanel Web Hosting - cPanel Hosting in India
Grab a Free SSL for your website.  WordPress Optimized Solution.