How to disable the innodb engine in mysql5.5 and mysq5.6 _ MySQL

Source: Internet
Author: User
How to disable the innodb engine in mysql5.5 and mysq5.6 today we found that a backup mysql data folder has become abnormal. I found three more files: ibdata1 ib_logfile0 ib_logfile1, the former 18 m, the last two 5 MB data were migrated from mysql5.0 to 5.5 during migration, while 5.5 disabled innodb and started up, so I started innodb, innodb will add these data files and log files by default, resulting in larger size. I tried to set the size of the data file, and the result showed me that the minimum size is 10 MB, which is too large. so I explored how to disable innodb.

The log shows that the mysql program has been upgraded, and you need to run mysql_upgrade to upgrade the database in mysql. this is relatively simple. it is the same as the mysql command usage. it is OK to run it once. Then I found that innodb still could not be disabled. it was strange that I found that innodb was used by default in mysql5.5, so I couldn't simply close it. I also needed to set the default engine to myisam, in my. add the following two sentences to cnf:


Default-storage-engine = MYISAM
Innodb = OFF


Restart mysql and delete the three annoying files.

Disable INNODB in MySQL 5.6

INNODB was developed after MySQL was acquired by ORACLE and supports advanced functions such as transactions and row-level locks, but not all of them need INNODB. for most people, the MYISAM engine was enough, generally, the default engine is changed to MYISAM, but INNODB still consumes memory and hard disk. in this case, INNODB needs to be completely disabled.

In the previous MySQL, you can set it like this:


Default-storage-engine = MYISAM
Skip-innodb


However, in the latest MySQL5.6, this setting cannot be started. you need to add another setting:


Default-tmp-storage-engine = MYISAM


In addition, you also need to add the following configurations, otherwise the program will exit easily:


Loose-innodb-trx = 0
Loose-innodb-locks = 0
Loose-innodb-lock-waits = 0
Loose-innodb-cmp = 0
Loose-innodb-cmp-per-index = 0
Loose-innodb-cmp-per-index-reset = 0
Loose-innodb-cmp-reset = 0
Loose-innodb-cmpmem = 0
Loose-innodb-cmpmem-reset = 0
Loose-innodb-buffer-page = 0
Loose-innodb-buffer-page-lru = 0
Loose-innodb-buffer-pool-stats = 0
Loose-innodb-metrics = 0
Loose-innodb-ft-default-stopword = 0
Loose-innodb-ft-inserted = 0
Loose-innodb-ft-deleted = 0
Loose-innodb-ft-being-deleted = 0
Loose-innodb-ft-config = 0
Loose-innodb-ft-index-cache = 0
Loose-innodb-ft-index-table = 0
Loose-innodb-sys-tables = 0
Loose-innodb-sys-tablestats = 0
Loose-innodb-sys-indexes = 0
Loose-innodb-sys-columns = 0
Loose-innodb-sys-fields = 0
Loose-innodb-sys-foreign = 0
Loose-innodb-sys-foreign-cols = 0


From http://docs.oracle.com/cd/E17952_01/refman-5.6-en/innodb-turning-off.html

In addition, MYSQL 5.6 occupies more physical memory than 5.5, and the virtual memory usage is similar to 5.5 (5.5 is also a large virtual memory consumption user ). The performance is improved by about 5.5 over 30% (according to the official documentation, no specific tests were conducted ).
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.