17

是否有我可以执行的 MySQL 命令,它会显示设置innodb_file_format,或者我应该检查的配置文件?

MySQL 版本:5.5.32

4

4 回答 4

30
show variables like 'innodb%';
于 2013-07-31T17:31:51.167 回答
3

The other answers are only half correct because not all InnoDB variables start with innodb_. See the manual for the full list of possible InnoDB variables your setup may have.

(Note that the manual shows the options for the latest version in each "release series". For example, the new innodb_flush_sync has just been added a few days ago, but it is already online in the 5.7 release series manual.)

To dump them all, use:

show variables where variable_name in(
    'unique_checks',
    'foreign_key_checks',
    'timed_mutexes',
    'ngram_token_size',
    'mecab_rc_file'
)or variable_name like'innodb_%'
or variable_name like'%_innodb'
or variable_name like'%_innodb_%'
or variable_name like'daemon_memcached_%'
or variable_name like'%_daemon_memcached'
or variable_name like'%_daemon_memcached_%';

The seemingly redundant boundary checks are included to guard against false positives when future introduction of non-InnoDB variables happens to contain the string "innodb" (e.g. "RinnoDB" or "InnoDbex").

于 2015-04-09T13:25:29.923 回答
2

show variables like 'inno%'应该在您运行查询时显示所有有效的 innodb 设置。

至于文件,可能在某处应该有 /etc/mysql/my.ini 或 my.cnf 之类的东西。

于 2013-07-31T17:32:04.817 回答
0

尝试这个

  SHOW ENGINE INNODB STATUS\G
于 2013-07-31T17:32:31.370 回答