Mysql change the default engine to Innodb steps of the method (to solve the problem can not start the mysql service)

Foreword

InnoDB and MyISAM are many people in the use of MySQL most commonly used type of two tables, two table types have advantages and disadvantages, depending on the specific application.

The basic difference is : MyISAM type of advanced processing transactions, which do not support, and support for InnoDB type. MyISAM table type to emphasize that performance, which performs several times faster than InnoDB type, but does not provide transaction support, and InnoDB provides transaction support and foreign keys and other advanced database features.

Why should I change the default engine, it is actually quite simple, Mysql default MyISAM engine I'm using, but MyISAM does not support transaction processing, so I need to replace its engine.

Change the default engine to InnoDB Mysql steps are as follows

The default is off the InnoDB Mysql storage engine, and the engine is set to the default InnoDB follows.

1. Check the Mysql storage engine: The  mysql>show engines InnoDB | YES, the description for this Mysql database server supports InnoDB engine.

2. Set the default InnoDB engine: configuration file in my.inithe [mysqld] below was addeddefault-storage-engine=INNODB

3. Restart Mysql server

4. Log Mysql database, mysql>show engines if there is  InnoDB |DEFAULT, then set InnoDB as the default engine success.

to sum up

These are the changes Mysql default engine for the entire contents Innodb hope of this paper for everyone to learn or work can bring some help, which is a solution to solve the problem when you install mysql, service can not be started and used.

Guess you like

Origin www.cnblogs.com/slovecd/p/12483004.html