"Database" MySQL change the default engine to InnoDB step method

Source: Internet
Author: User

Objective

InnoDB and MyISAM are the two most common table types used by many people when using MySQL, both of which have pros and cons, depending on the application.

The basic differences are: MyISAM types do not support advanced processing such as transaction processing, and InnoDB type support. The MyISAM type of table emphasizes performance, which is performed more quickly than the InnoDB type, but does not provide transactional support, while InnoDB provides advanced database functionality such as transactional support and external keys.

Why should I change the default engine, in fact the reason is very simple, I use the MySQL default engine is MyISAM, and MyISAM does not support transaction processing, so I need to replace its engine.

Change the Mysql default engine to InnoDB steps as follows:

MySQL default is to turn off the use of the InnoDB storage engine, set InnoDB as the default engine as follows.

1. View the MySQL storage engine: mysql>show engines InnoDB | YES This MySQL database server supports the InnoDB engine.

2. Set InnoDB as the default engine: In the configuration file under my.ini [mysqld], adddefault-storage-engine=INNODB

3. Restart the MySQL server

4. Log in to the MySQL database and, mysql>show engines  if present InnoDB |DEFAULT , set InnoDB as the default engine for success.

Summarize

The above is to change the MySQL default engine for InnoDB all content, hope that the content of this article on everyone's study or work can bring some help, if there are questions you can message exchange.

"Database" MySQL change the default engine to InnoDB step method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.