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!