change default storage engine in mysql

June 6th, 2011 § 1 comment

Here is the small tip to change the default storage engine in mysql from MyISAM into InnoDB.
You need to edit the configuration file of MySql in order to change the default storage engine.
In ubuntu you can see the file in /etc/mysql/my.cnf. You need admin privilage for editing this file.

So the simple way to edit this file is to run the following command.

step 1 :

sudo gedit /etc/mysql/my.cnf

if you are using wamp the you need to edit

 path\to\wamp\bin\mysql\mysql[your mysql version]\my.ini

Eg: C:\wamp\bin\mysql\mysql5.5.8\my.ini

step 2:

find “[mysqld]

Step 3:

add this line below the [mysqld]


step 4 :

restart the mysql server using the following command

sudo service mysql restart

if you are using wamp the you can restart the mysql from the notification area.

step 5 :

check the status of the engines using the following command in mysql prompt

show  engines;

Revath S Kumar [RSK]

- Rubyist / JavaScripter - Yeoman Team member - Open source enthusiast - Blogger @ PHPRepo and - Coder @ Whatznear - Google fanboy - jQuery lover

More Posts - Website - Twitter - Facebook - LinkedIn - Pinterest - Google Plus - YouTube

  • dasjet

    nice work brother…