Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ruby-on-rails-3/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将my.cnf更改为设置MySQL复制_Mysql_Ubuntu - Fatal编程技术网

将my.cnf更改为设置MySQL复制

将my.cnf更改为设置MySQL复制,mysql,ubuntu,Mysql,Ubuntu,我按照教程设置MySQL复制(我使用的是Ubuntu) 根据以上教程,这是我希望在my.cnf文件中使用的配置: [mysqld] log-bin = mysql-bin server-id = 1 relay-log = relay-log-slave gtid-mode =ON enforce-gtid-consistency binlog_format = MIXED log_slave_updates 我在下面找到了my.cnf:/etc/mysql: 当我打开my.cnf时,这是内

我按照教程设置MySQL复制(我使用的是Ubuntu)

根据以上教程,这是我希望在my.cnf文件中使用的配置:

[mysqld]
log-bin = mysql-bin
server-id = 1
relay-log = relay-log-slave
gtid-mode =ON
enforce-gtid-consistency
binlog_format = MIXED
log_slave_updates
我在下面找到了my.cnf:
/etc/mysql

当我打开my.cnf时,这是内容(不确定为什么文件图标显示为快捷图标?)

#
#MySQL数据库服务器配置文件。
#                                              /****************************/

#您可以将其从MySQL 5.7复制到以下路径之一:/*,默认配置文件路径为
/etc/MySQL/MySQL.conf.d/mysqld.cnf

在5.7版本之前,文件路径将是
/etc/mysql/my.cnf
/etc/my.cnf

如果参数不存在,则添加到配置文件的
[mysqld]
部分

#
# The MySQL database server configuration file.
#                                              /****************************/
# You can copy this to one of:                 /* <-- what does this mean? */   
# - "/etc/mysql/my.cnf" to set global options, /****************************/    
# - "~/.my.cnf" to set user-specific options.
# 
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html

#
# * IMPORTANT: Additional settings that can override those from this file!
#   The files must end with '.cnf', otherwise they'll be ignored.
#

!includedir /etc/mysql/conf.d/
!includedir /etc/mysql/mysql.conf.d/