MySQL storage engine MyISAM and InnoDB

Source: Internet
Author: User
Tags install perl

MyISAM and InnoDB

MyISAM is the storage engine used before the mysql5.7 version.
The advantage is used in the case of high query frequency, such as the data fetch of the website store.
The disadvantage is not to support transactions, not suitable for banks, securities and so on.
Table-locked read and write blocking

InnoDB is the storage engine used by the mysql5.7 version.
Benefits Support Transactions
The disadvantage is that the data fetch speed is not myisam so fast
Row locking record read and write blocking

Mysql> show engines; View MySQL default storage engine

Mysql> Show create table list; View the storage engine that created the table list

mysql> ALTER TABLE list Engine=myisam; Modify the existing table's storage engine to MyISAM

Vim/etc/my.cnf
Under the Mysqld module, add the row
Default-storage-engine=myisam
Restart MySQL
Subsequent tables are created with Mylsam as the default storage engine

Bulk Change Tables
Yum Install Perl-dbi-y
Yum Install Perl-dbd-mysql-y
To install a two package first
Vim/usr/local/mysql/bin/mysql_convert_table_format//Modify the configuration file for this command
"E|engine|type=s" = $opt _engine//32 Line Modification
Mysql_convert_table_format--host=localhost--user=root--password=123123--socket=/home/mysql/mysql.sock--engine= InnoDB school list; Use this command to bulk modify




Change to MyISAM again
Mysql_convert_table_format--user=root--password=123123--socket=//home/mysql/mysql.sock--engine=MyISAM School List

Note:
Bulk Modify the MySQL password set by root--password= itself
--socket= the path specified at compile time/mysql.scok
--engine=myisam Library Table ...

MySQL storage engine MyISAM and InnoDB

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.