How do I check my InnoDB settings?

后端 未结 4 502
清酒与你
清酒与你 2021-01-11 10:24

Is there a MySQL command that I can execute which will show settings such as innodb_file_format, or a configuration file which I should check?

MySQL ver

4条回答
  •  失恋的感觉
    2021-01-11 10:35

    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").

提交回复
热议问题