主库配置 
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.
[client]
port = 3306
socket=/tmp/mysql.sock [mysqld]
port = 3306
socket=/tmp/mysql.sock
skip-external-locking
datadir=/usr/local/mysql/data
key_buffer_size = 32M
max_allowed_packet = 1M
table_open_cache = 4096
sort_buffer_size = 4M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
lower_case_table_names = 0
log-bin=master-bin
log-bin-index=master-bin.index
binlog_format=mixed
max_allowed_packet=50M
connect_timeout=60
net_read_timeout = 60
max_connections=2000
binlog-do-db=jrd
replicate-do-db=jrd
binlog-ignore-db=mysql
binlog-ignore-db=test
binlog-ignore-db=information_schema
binlog-ignore-db=performance_schema
replicate-ignore-db=test
replicate-ignore-db=mysql
replicate-ignore-db=information_schema
replicate-ignore-db=performance_schema
binlog-ignore-db=mysql,test
server-id = 1 # cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M # Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin # These are commonly set, remove the # and set as required.
# basedir = .....
# datadir = .....
# port = .....
# server_id = .....
# socket = ..... # Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
从库
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.
[client]
port = 3306
socket=/tmp/mysql.sock [mysqld]
port = 3306
socket=/tmp/mysql.sock
skip-external-locking
datadir=/usr/local/mysql/data
key_buffer_size = 32M
max_allowed_packet = 1M
table_open_cache = 4096
sort_buffer_size = 4M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
lower_case_table_names = 0
log-bin=master-bin
log-bin-index=master-bin.index
binlog_format=mixed
max_allowed_packet=50M
connect_timeout=60
net_read_timeout = 60
max_connections=2000 binlog-do-db=jrd
replicate-do-db=jrd binlog-ignore-db=mysql
binlog-ignore-db=test
binlog-ignore-db=information_schema
binlog-ignore-db=performance_schema replicate-ignore-db=test
replicate-ignore-db=mysql
replicate-ignore-db=information_schema
replicate-ignore-db=performance_schema relay-log =relay-log
relay-log-index =relay-log.index
binlog_format=mixed
max_allowed_packet=50M
lower_case_table_names = 0
log-bin=master-bin
log-bin-index=master-bin.index
server-id = 11 # Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# datadir = .....
# port = .....
# server_id = .....
# socket = ..... # Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

Mysql 主从限制数据库的更多相关文章

  1. MySQL主从同步报Client requested master to start replication from position

    数据库版本:5.6.16 测试环境MySQL 主从,数据库被人重启,忘记开启start slave,导致主从失效,停了一天的数据没有追上. 查看从库的数据库状态:show   slave   stat ...

  2. 一次mysql主从加keepalived配置搭建及切换演示

    [需求] 根据需求需要搭建mysql主从架构数据库及加keepalived进行自动切换VIP [环境介绍]  系统环境:CentOS release 6.4 (Final) + Server vers ...

  3. ubuntu mysql主从库的搭建

    1,首先我们要确定一个从库一个主库,紧记从库只能读取不能有其他的操作,如果操作写那主从就失效了,那就看看我们这么搭建主从吧! 2. 环境:Ubuntu,Mysql (主从的数据库版本必须保持一致) 主 ...

  4. MySQL主从数据库同步延迟问题解决(转)

    最近在做MySQL主从数据库同步测试,发现了一些问题,其中主从同步延迟问题是其中之一,下面内容是从网上找到的一些讲解,记录下来以便自己学习: MySQL的主从同步是一个很成熟的架构,优点为:①在从服务 ...

  5. Mysql主从数据库架构的复制原理及配置详解

    1 复制概述 Mysql内建的复制功能是构建大型,高性能应用程序的基础.将Mysql的数据分布到多个系统上去,这种分布的机制,是通过将Mysql的某一台主机的数据复制到其它主机(slaves)上,并重 ...

  6. MySQL 主从数据库设置

    1.复制的介绍 MySQL 支持单向.异步复制,复制过程中一个服务器充当主服务器,而一个或多个其它服务器充当从服务器.主服务器将更新写入二进制日志文件,并维护文件的一个索引 以跟踪日志循环.这些日志可 ...

  7. mysql主从数据库

    Mysql主从配置,实现读写分离 大型网站为了软解大量的并发访问,除了在网站实现分布式负载均衡,远远不够.到了数据业务层.数据访问层,如果还是传统的数据结构,或者只是单单靠一台服务器扛,如此多的数据库 ...

  8. Mysql 主从数据库

    MYSQL主从数据库同步备份配置 一.准备 用两台服务器做测试: Master Server: 172.16.0.180/Linux/MYSQL 5.1.41 Slave Server: 172.16 ...

  9. 解决mysql 主从数据库同步不一致的方法

    接着上文 配置完Mysql 主从之后,在使用中可能会出现主从同步失败的情况. mysql> show slave status\G Slave_IO_Running: Yes Slave_SQL ...

随机推荐

  1. 在mac版virtual box中安装ubuntu虚拟机的NAT/Host-Only网络配置踩坑记录

    之前用惯了vmware和parallels desktop,网络配置十分智能,基本不用自己配置.由于版权原因,工作电脑上换了免费的virtual box用,四五年都完全在虚拟机里干活的本菜鸡居然在虚拟 ...

  2. Android开发之程序猿必需要懂得Android的重要设计理念

         前几天去參加了带着自己的作品去參加服务外包大赛,由于签位抽到的比較靠后就等待了蛮久,就跟坐在前面的一起參赛的选手開始讨论Android的开发经验.各自给对方展示了自己的作品,小伙伴就建议我看 ...

  3. HTML + CSS (下)【更新中】

    弹性盒子: 定义:弹性盒子模型是css3中新提出的一种布局方案.是一种为了应对针对不同屏幕宽度不同设备的一整套新的布局方案. 主要是对一个容器中的子元素进行排列.对齐和分配空白空间的方案的调整. 新旧 ...

  4. 关于STLINK

    关于STLINK 1.STLIN固件升级 1)打开ST-LINK Utility,选择ST-LINK->Firmware update 2)连接ST-LINK 3)可以看到STLINK当前的软件 ...

  5. python_django_admin

    admin 是Django提供的基于web的管理工具,是系统管理员用于数据的输入,删除和查询的管理工具. 超级管理员在settings中的集成:INSTALLED_APPS=['django.cont ...

  6. Postman Interceptor和postman更改id仍然无法使用的,从这里下载相同版本的postman和interceptor插件

    1.postman安装: chrome://extensions/打开,把下载好的postman插件拖到里面就可以了. 2.Postman interceptor安装: chrome://extens ...

  7. delphi 设备函数GetDeviceCaps函数

    {说明:以下内容来源于网络,修改多处错误所得 2019.10.04 } GetDeviceCaps 函数功能:该函数检索指定设备的设备指定信息.该函数经常用在操作打印机等设备中.函数原型:int Ge ...

  8. 高级运维(四):Nginx常见问题处理、安装部署Tomcat服务器、使用Tomcat部署虚拟主机

    一.Nginx常见问题处理 目标: 本案例要求对Nginx服务器进行适当优化,以提升服务器的处理性能: 1> 不显示Nginx软件版本号 2> 如果客户端访问服务器提示“Too many ...

  9. Alibaba Cloud Toolkit,你确定不来尝鲜一下?

    阿里云出了新的工具,Alibaba Cloud Toolkit,看看“toolkit”这个名字就知道它是一个工具集. 没错!它就是一个工具集,一个集打包部署发布以及探索分析程序的工具集.而我,目前还停 ...

  10. RestHighLevelClient客户端相关CURD操作

    客户端连接 public void start() { try { restHighLevelClient = new RestHighLevelClient( RestClient.builder( ...