How to change MySQL database engine to INNODB _ MySQL

Source: Internet
Author: User
This article describes how to modify the MySQL database engine to INNODB. For MySQL databases, if you want to use transactions and row-level locks, you must use the INNODB engine. If you want to use full-text indexes, you must use myisam. INNODB is more practical, secure, and stable, but less efficient than MYISAM. However, some functions are not available in MYISAM. Modify MySQL engine to INNODB. you can use foreign keys, transactions, and other functions with high performance. This article describes how to change the MySQL database engine to INNODB.

First, modify my. ini and add the following under [mysqld:

default-storage-engine=INNODB 

The blue font indicates the name of the database engine to be specified.

Use SQL statements to modify the engine of a table:

alter table tableName type=InnoDB 

The my. ini file is posted below for your reference:

[mysqld]  basedir=C:\Program Files\VertrigoServ\Mysql\  datadir=C:\Program Files\VertrigoServ\Mysql\data\  port =3306  key_buffer =64M  max_allowed_packet =1M  table_cache =128  sort_buffer_size =512K  net_buffer_length =8K  read_buffer_size =256K  read_rnd_buffer_size =512K  myisam_sort_buffer_size =68M  default-storage-engine=INNODB  [mysqldump]  quick  max_allowed_packet =116M  [mysql]  no-auto-rehash  # Remove the next comment character if you are not familiar with SQL  #safe-updates  [isamchk]  key_buffer =20M  sort_buffer_size =20M  read_buffer =62M  write_buffer =62M  [myisamchk]  key_buffer =20M  sort_buffer_size =20M  read_buffer =62M  write_buffer =62M  [mysqlhotcopy]  interactive-timeout 

Follow the prompts in the above code to successfully modify the MySQL database engine to INNODB. This article introduces you here, and I believe it will surely bring you some benefits!

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.