ForMySQL databaseIf you want to use transactions and row-level locks, you must useINNODBEngine. 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 modifyMySQL Database EngineThis is INNODB. Next we will introduce it.
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
My. ini file for reference (http://www.my400800.cn) is posted below ):
- [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 will introduce you here. If you want to learn more about MySQL databases, read the article here: http://database.51cto.com/mysql/. I believe it will surely bring you a harvest!