20

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 version: 5.5.32

4 Answers 4

38
show variables like 'innodb%';
5

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

2

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.

1
  • /etc/mysql/my.cnf Contains some MySQL information, though only a short blurb on InnoDB: # InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/. # Read the manual for more InnoDB related options. There are many! It's a starting point, though!
    – Lemmings19
    Jul 31, 2013 at 17:37
0

Try This

  SHOW ENGINE INNODB STATUS\G
1
  • 1
    This provides some metrics regarding InnoDB, however it does not provide any information on the settings. Thanks, though.
    – Lemmings19
    Jul 31, 2013 at 17:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.