my.cnf文件关于组选项的总结-创新互联
1、[server]和[mysqld]的区别,没有看到官方文档,个人感觉server指整台服务器,mysqld指实例,当一台服务器上多个实例使用同一个配置文件my.cnf时,[server]通用于所有实例,[mysqld_3306] [[mysqld_3307] [mysqld_3308]对应单独实例
为阿合奇等地区用户提供了全套网页设计制作服务,及阿合奇网站建设行业解决方案。主营业务为成都网站设计、成都网站制作、阿合奇网站设计,以传统方式定制建设网站,并提供域名空间备案等一条龙服务,秉承以专业、用心的态度为用户提供真诚的服务。我们深信只要达到每一位用户的要求,就会得到认可,从而选择与我们长期合作。这样,我们也可以走得更远!2、mysqld从[mysqld]和[server]组中读取选项。 mysqld_safe从[mysqld],[server],[mysqld_safe]和[safe_mysqld]组中读取选项。 mysql.server从[mysqld]和[mysql.server]组中读取选项。
3、[client]组更通用,因为它被所有客户端程序读取,而[mysqldump]组只能由mysqldump读取
4、后面的选项会覆盖前面的选项,比如按[client],[mysqldump]的顺序放置选项组,则[mysqldump]选项会覆盖[client]选项
/tupian/20230522/option-files.html
[group]
group is the name of the program or group for which you want to set options. After a group line, any option-setting lines apply to the named group until the end of the option file or another group line is given. Option group names are not case-sensitive.
group是要为其设置选项的程序或组的名称。 在组行之后,任何选项设置行都将应用于命名组,直到选项文件的末尾或另一个组行为止。 选项组名称不区分大小写。
If an option group name is the same as a program name, options in the group apply specifically to that program. For example, the [mysqld] and [mysql] groups apply to the mysqld server and the mysql client program, respectively.
The [client] option group is read by all client programs provided in MySQL distributions (but not by mysqld).
如果选项组名称与程序名称相同,则组中的选项将专门应用于该程序。 例如,[mysqld]和[mysql]组分别应用于mysqld服务器和mysql客户端程序。
[client]选项组由MySQL发行版中提供的所有客户端程序读取(但不是由mysqld提供)。
The [client] group enables you to specify options that apply to all clients. For example, [client] is the appropriate group to use to specify the password for connecting to the server. (But make sure that the option file is accessible only by yourself, so that other people cannot discover your password.) Be sure not to put an option in the [client] group unless it is recognized by all client programs that you use. Programs that do not understand the option quit after displaying an error message if you try to run them.
List more general option groups first and more specific groups later. For example, a [client] group is more general because it is read by all client programs, whereas a [mysqldump] group is read only by mysqldump. Options specified later override options specified earlier, so putting the option groups in the order [client], [mysqldump] enables mysqldump-specific options to override [client] options.
[client]组使您可以指定适用于所有客户端的选项。 例如,[client]是用于指定连接到服务器的密码的适当组。 (但请确保选项文件只能由您自己访问,以便其他人无法发现您的密码。)请确保不要在[client]组中添加选项,除非您使用的所有客户端程序都能识别它。 如果您尝试运行错误消息,则在显示错误消息后,不理解该选项的程序将退出。
首先列出更多通用选项组,稍后列出更具体的组。 例如,[client]组更通用,因为它被所有客户端程序读取,而[mysqldump]组只能由mysqldump读取。 稍后指定的选项会覆盖先前指定的选项,因此按[client],[mysqldump]的顺序放置选项组会启用特定于mysqldump的选项来覆盖[client]选项。
To create option groups to be read only by mysqld servers from specific MySQL release series, use groups with names of [mysqld-5.6], [mysqld-5.7], and so forth. The following group indicates that the sql_mode setting should be used only by MySQL servers with 5.7.x version numbers:
[mysqld-5.7]
sql_mode=TRADITIONAL
要创建仅由特定MySQL发行系列中的mysqld服务器读取的选项组,请使用名称为[mysqld-5.6],[mysqld-5.7]等的组。 以下组表示sql_mode设置应仅由具有5.7.x版本号的MySQL服务器使用:
[mysqld-5.7]
sql_mode=TRADITIONAL
Write the contents of an included option file like any other option file. That is, it should contain groups of options, each preceded by a [group] line that indicates the program to which the options apply.
像任何其他选项文件一样写入包含的选项文件的内容。 也就是说,它应该包含选项组,每个选项前面都有一个[group]行,表示选项适用的程序。
/tupian/20230522/server-options.html
mysqld reads options from the [mysqld] and [server] groups. mysqld_safe reads options from the [mysqld], [server], [mysqld_safe], and [safe_mysqld] groups. mysql.server reads options from the [mysqld] and [mysql.server] groups.
An embedded MySQL server usually reads options from the [server], [embedded], and [xxxxx_SERVER] groups, where xxxxx is the name of the application into which the server is embedded.
mysqld从[mysqld]和[server]组中读取选项。 mysqld_safe从[mysqld],[server],[mysqld_safe]和[safe_mysqld]组中读取选项。 mysql.server从[mysqld]和[mysql.server]组中读取选项。
嵌入式MySQL服务器通常从[server],[embedded]和[xxxxx_SERVER]组中读取选项,其中xxxxx是嵌入服务器的应用程序的名称。
/tupian/20230522/server-options.html#option_mysqld_defaults-group-suffix
Read not only the usual option groups, but also groups with the usual names and a suffix of str. For example, mysqld normally reads the [mysqld] group. If the --defaults-group-suffix=_other option is given, mysqld also reads the [mysqld_other] group.
不仅要读取常用选项组,还要读取通常名称和后缀str的组。 例如,mysqld通常读取[mysqld]组。 如果给出了--defaults-group-suffix = _other选项,mysqld也会读取[mysqld_other]组。
网站题目:my.cnf文件关于组选项的总结-创新互联
路径分享:http://scyanting.com/article/piieg.html