如何在 Mysql 5.7.13 中禁用 InnoDB?
How to disable InnoDB in Mysql 5.7.13?
我最近将我的低内存 VPS 从 Ubuntu Server 14.04 升级到 Ubuntu Server 16.04。
我从不使用 InnoDB,所以我总是通过配置文件禁用它。
不幸的是,服务器升级后我无法做到这一点,并且 mysql 进程 "eating" RAM 多得多。
我试过这个配置:
[client]
default-character-set=utf8
[mysqld]
innodb=OFF
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
skip-innodb
ignore-builtin-innodb
default-storage-engine=MyISAM
default-tmp-storage-engine=MyISAM
init_connect='SET collation_connection = utf8_unicode_ci; SET NAMES utf8;'
character-set-server=utf8
collation-server=utf8_unicode_ci
skip-character-set-client-handshake
不幸的是 InnoDB 仍然有效,例如我可以通过 Mysql Workbench 创建 InnoDB 表。我错过了什么吗?
root@:~# mysql -V
mysql Ver 14.14 Distrib 5.7.13, for Linux (x86_64) using EditLine wrapper
显示引擎:
PERFORMANCE_SCHEMA YES Performance Schema NO NO NO
CSV YES CSV storage engine NO NO NO
MRG_MYISAM YES Collection of identical MyISAM tables NO NO NO
BLACKHOLE YES /dev/null storage engine (anything you write to it disappears) NO NO NO
InnoDB YES Supports transactions, row-level locking, and foreign keys YES YES YES
MEMORY YES Hash based, stored in memory, useful for temporary tables NO NO NO
ARCHIVE YES Archive storage engine NO NO NO
MyISAM DEFAULT MyISAM storage engine NO NO NO
FEDERATED NO Federated MySQL storage engine
MySQL 文档说:
"As of MySQL 5.7.5, the InnoDB storage engine can no longer be
disabled, and the --innodb=OFF and --skip-innodb options are
deprecated and have no effect. Their use results in a warning. These
options will be removed in a future MySQL release."
我最近将我的低内存 VPS 从 Ubuntu Server 14.04 升级到 Ubuntu Server 16.04。 我从不使用 InnoDB,所以我总是通过配置文件禁用它。 不幸的是,服务器升级后我无法做到这一点,并且 mysql 进程 "eating" RAM 多得多。
我试过这个配置:
[client]
default-character-set=utf8
[mysqld]
innodb=OFF
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
skip-innodb
ignore-builtin-innodb
default-storage-engine=MyISAM
default-tmp-storage-engine=MyISAM
init_connect='SET collation_connection = utf8_unicode_ci; SET NAMES utf8;'
character-set-server=utf8
collation-server=utf8_unicode_ci
skip-character-set-client-handshake
不幸的是 InnoDB 仍然有效,例如我可以通过 Mysql Workbench 创建 InnoDB 表。我错过了什么吗?
root@:~# mysql -V
mysql Ver 14.14 Distrib 5.7.13, for Linux (x86_64) using EditLine wrapper
显示引擎:
PERFORMANCE_SCHEMA YES Performance Schema NO NO NO
CSV YES CSV storage engine NO NO NO
MRG_MYISAM YES Collection of identical MyISAM tables NO NO NO
BLACKHOLE YES /dev/null storage engine (anything you write to it disappears) NO NO NO
InnoDB YES Supports transactions, row-level locking, and foreign keys YES YES YES
MEMORY YES Hash based, stored in memory, useful for temporary tables NO NO NO
ARCHIVE YES Archive storage engine NO NO NO
MyISAM DEFAULT MyISAM storage engine NO NO NO
FEDERATED NO Federated MySQL storage engine
MySQL 文档说:
"As of MySQL 5.7.5, the InnoDB storage engine can no longer be disabled, and the --innodb=OFF and --skip-innodb options are deprecated and have no effect. Their use results in a warning. These options will be removed in a future MySQL release."