Change the MySQL default engine to InnoDB single multiple

Source: Internet
Author: User

MySQL default is to turn off the use of the InnoDB storage engine, set InnoDB as the default engine as follows.
1. View MySQL storage engine condition: mysql>show engines. InnoDB | YES, indicating that this MySQL database server supports the InnoDB engine.
2. Set INNODB as the default engine: Add default-storage-engine=innodb under [mysqld] in configuration file My.ini
3. Restart the MySQL server
4. Log in to MySQL database, Mysql>show engines. If InnoDB appears | Default, which indicates that the setting InnoDB is successful.



To modify a single-sheet engine directly:

ALTER TABLE TT7 ENGINE=INNODB;



Attached: MySQL modifies the storage engine of all tables under a database to the INNODB type statement


SELECT Group_concat (CONCAT (' ALTER TABLE ', table_name, ' engine=innodb; ') SEPARATOR ') from INFORMATION_SCHEMA. TABLES as t WHERE table_schema = ' database name ' and table_type = ' MyISAM '

Instructions for use:

1. Replace [DBNAME] in the SQL statement above with the name of the database you want to modify.

2. Execute SQL, this time has not been modified, just gave a query result.

3. Copy the query results, remove the front and back quotation marks, and then execute.









This article is from "Phper Xuchen-Focus on PHP Technology" blog, be sure to keep this source http://xuqin.blog.51cto.com/5183168/1657141

Change the MySQL default engine to InnoDB single multiple

Related Article

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.