How to modify the MySQL database engine

Source: Internet
Author: User

For MySQL databases , you must use the INNODB engine If you want to use transactions and row-level locks. If you want to use full-text indexing, you must use MyISAM. InnoDB is more practical, safer, more stable but less efficient than MyISAM, but some features are myisam. Modified MySQL engine for InnoDB, can use foreign keys, transactions and other functions, high performance. This article mainly describes how to modify the MySQL database engine for InnoDB, and then we begin to introduce.

First modify the My.ini and add it under [mysqld]:

Default-storage-engine=innodb

Where the blue font is the name of the database engine to be specified.

To modify an already built table engine with an SQL statement:

ALTER TABLE TableName TYPE=INNODB--type syntax in 4. exists under X version
ALTER TABLE TableName ENGINE=INNODB--5.x changed to Engine=innodb

My My.ini file is posted below for reference (http://www.my400800.cn):

[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

Following the code hints above, we were able to successfully modify the MySQL database engine to InnoDB. This article is introduced here, if you want to learn more MySQL database knowledge, may wish to look at the article here: http://database.51cto.com/mysql/, I believe will bring you the harvest!


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.