How do I check my InnoDB settings?

后端 未结 4 492
清酒与你
清酒与你 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:34

    Try This

      SHOW ENGINE INNODB STATUS\G
    
    0 讨论(0)
  • 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").

    0 讨论(0)
  • 2021-01-11 10:59
    show variables like 'innodb%';
    
    0 讨论(0)
  • 2021-01-11 11:00

    show variables like 'inno%' should show up all the innodb settings in effect at the moment you run the query.

    As for files, there should probably be something like /etc/mysql/my.ini or a my.cnf somewhere.

    0 讨论(0)
提交回复
热议问题