{"id":20633,"date":"2020-11-30T04:23:10","date_gmt":"2020-11-29T20:23:10","guid":{"rendered":"https:\/\/web.mwwsb.com.my\/pjci\/?post_type=kb&p=20633"},"modified":"2023-01-18T10:58:08","modified_gmt":"2023-01-18T02:58:08","slug":"working-with-mysql-database-engines","status":"publish","type":"kb","link":"https:\/\/www.casbay.com\/guide\/kb\/working-with-mysql-database-engines","title":{"rendered":"Working with MySQL database engines"},"content":{"rendered":"\t\t
\n\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t

Working with MySQL database engines<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t

MySQL Database Engines<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

Database engines provide underlying functionality for MySQL to work with and process data.<\/p>

There are two most common and popular MySQL database engines: MyISAM<\/strong> and InnoDB<\/strong>. MyISAM<\/strong> is the default engine for MySQL (versions earlier than 5.5.5). It functions well in most scenarios and it is depending on your needs. There are some situations where another database engine, such as InnoDB<\/strong>, may be the better choice. For example, one of the differences between them is InnoDB supports transactions, whereas MyISAM does not. Besides, InnoDB provides support for foreign keys, whereas MyISAM does not.<\/p>

Furthermore, you can complete control over how and when MySQL uses the various database engines when you have root access to your server. You can also change the default database engine, change the database engine of a specific table, and more.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t

Determining The Default Database Engine\n<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

Firstly, type the following command at the mysql<\/strong>> prompt:<\/p>

SHOW ENGINES;
A list of supported engines appears, along with a brief description and the supported features for each engine. The default database engine is marked DEFAULT<\/strong> in the “Support” column.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t

Changing The Default Database Engine<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

You can change the default database engine for your MySQL installation. After you do this, all new tables that you create will use the new database engine (unless you explicitly set the engine during table creation).<\/p>

To change the default database engine, follow these steps:<\/p>

  1. Use your preferred text editor to open the\u00a0my.cnf<\/em>\u00a0file on your server. The location of the\u00a0my.cnf<\/em>\u00a0file depends on your Linux distribution: