MySQL configuration: when to use hyphen and when to use underscore

前端 未结 2 1600
慢半拍i
慢半拍i 2021-01-03 21:50

In MySQL some configuration options use _ and some use -. Is there any way to easily identify when to use one versus the other?.

相关标签:
2条回答
  • 2021-01-03 21:58

    No.

    It's just one of those things that happen when a team of people design a product.
    Different conventions get used leading to inconsistency.

    See here: http://dev.mysql.com/doc/refman/5.5/en/mysqld-option-tables.html

    And scroll to the options starting with ssl, you'll see what I mean.

    0 讨论(0)
  • 2021-01-03 22:13

    According to the suggestion in the mysql bug report discussing the confusing state of the mysql docs:

    1. The my.cnf and command line options you can use either _ or - within the option name.
    2. Server variables are _ only when working with the MySQL client (modifying from SET for example).

    In summary, you can use _ and - interchangeably within a config file.

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