my.cnf variables: underscores or hyphens ...

  • Filter
  • Time
  • Show
Clear All
new posts

  • my.cnf variables: underscores or hyphens ...

    I have been setting up a new MySQL 5.6 server and tuning it per MySQL recommendations and Percona resources, specifically the configuration wizard. The wizard created a terrific config file, but I noticed that it set variable with hyphens versus underscores. The hyphen versus underscore usage I have seen used interchangeably in config files many times, and there seems not to be any consistency.

    Per MySQL's documentation (see link), command line options use the hyphen and configuration variables use the underscore. I would like to know if either can be used in the 'my.cnf' config file, as it seems in many examples, and Percona's own wizard, the hyphen is used.

    One example is the InnoDB buffer pool size variable. Percona's wizard output is 'innodb-buffer-pool-size', whereas MySQL's documentation says the configuration variable is 'innodb_buffer_pool_size'. I have seen both in other configuration examples. Does it matter?

    InnoDB buffer pool size URL: https://dev.mysql.com/doc/refman/5.5...ffer_pool_size

  • #2
    Both are acceptable. It shouldn't create any problem.