Mysql 主从限制数据库
主库配置
# 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 主从限制数据库的更多相关文章
- MySQL主从同步报Client requested master to start replication from position
数据库版本:5.6.16 测试环境MySQL 主从,数据库被人重启,忘记开启start slave,导致主从失效,停了一天的数据没有追上. 查看从库的数据库状态:show slave stat ...
- 一次mysql主从加keepalived配置搭建及切换演示
[需求] 根据需求需要搭建mysql主从架构数据库及加keepalived进行自动切换VIP [环境介绍] 系统环境:CentOS release 6.4 (Final) + Server vers ...
- ubuntu mysql主从库的搭建
1,首先我们要确定一个从库一个主库,紧记从库只能读取不能有其他的操作,如果操作写那主从就失效了,那就看看我们这么搭建主从吧! 2. 环境:Ubuntu,Mysql (主从的数据库版本必须保持一致) 主 ...
- MySQL主从数据库同步延迟问题解决(转)
最近在做MySQL主从数据库同步测试,发现了一些问题,其中主从同步延迟问题是其中之一,下面内容是从网上找到的一些讲解,记录下来以便自己学习: MySQL的主从同步是一个很成熟的架构,优点为:①在从服务 ...
- Mysql主从数据库架构的复制原理及配置详解
1 复制概述 Mysql内建的复制功能是构建大型,高性能应用程序的基础.将Mysql的数据分布到多个系统上去,这种分布的机制,是通过将Mysql的某一台主机的数据复制到其它主机(slaves)上,并重 ...
- MySQL 主从数据库设置
1.复制的介绍 MySQL 支持单向.异步复制,复制过程中一个服务器充当主服务器,而一个或多个其它服务器充当从服务器.主服务器将更新写入二进制日志文件,并维护文件的一个索引 以跟踪日志循环.这些日志可 ...
- mysql主从数据库
Mysql主从配置,实现读写分离 大型网站为了软解大量的并发访问,除了在网站实现分布式负载均衡,远远不够.到了数据业务层.数据访问层,如果还是传统的数据结构,或者只是单单靠一台服务器扛,如此多的数据库 ...
- Mysql 主从数据库
MYSQL主从数据库同步备份配置 一.准备 用两台服务器做测试: Master Server: 172.16.0.180/Linux/MYSQL 5.1.41 Slave Server: 172.16 ...
- 解决mysql 主从数据库同步不一致的方法
接着上文 配置完Mysql 主从之后,在使用中可能会出现主从同步失败的情况. mysql> show slave status\G Slave_IO_Running: Yes Slave_SQL ...
随机推荐
- 可重入锁:ReentrantLock理解使用
(一)可重入性 可重入性描述这样的一个问题:一个线程在持有一个锁的时候,它内部能否再次(多次)申请该锁.如果一个线程已经获得了锁,其内部还可以多次申请该锁成功.那么我们就称该锁为可重入锁.通过以下伪代 ...
- LINUX搭建网站环境教程
安装Mysql yum install mysql-server -y 启动Mysql service mysqld restart 此实验使用 mysql 默认账户名和密码,您也可以设置自己的 My ...
- LeetCode Array Medium 11. Container With Most Water
Description Given n non-negative integers a1, a2, ..., an , where each represents a point at coordin ...
- Element UI - 打开弹出框(el-dialog)页面会抖动
当 dialog 出现时,页面右边缩小了 5px,模态框看起来会抖动 解决方案 发现 body 多了样式:padding-right: 5px 和 overflow: hidden.紧接着我就在全局设 ...
- 有穷自动机(NFA、DFA)&正规文法&正规式之间的相互转化构造方法
在编译原理(第三版清华大学出版社出版)中第三章的词法分析中,3.4.3.5.3.6小节中分别讲解了 1.什么是NFA(不确定的有穷自动机)和DFA(确定的有穷自动机) 2.如何将 不确定的有穷自动机 ...
- Dubbo---zookeeper 注册中心---xml配置
1.项目结构(maven项目) 2.pom <?xml version="1.0" encoding="UTF-8"?> <project x ...
- 深入理解Magento – 第二章 – Magento请求分发与控制器
深入理解Magento 作者:Alan Storm 翻译:Hailong Zhang 第二章 – Magento请求分发与控制器 Model-View-Controller (MVC) ,模型-视图- ...
- webpack最基本的用法
webpack 安装 webpack是所以Node.js开发的工具,可通过npm安装,首先要保证node已经安装完毕,可以去node官网下载, 然后通过npm下载webpack npm install ...
- JavaScript 原生事件
1.原生事件的绑定:https://www.cnblogs.com/shsxt/p/7903216.html a.DOM0级事件: 1. 行内事件 2. 元素.on事件名=函数 b.DOM2级事件:a ...
- 排序算法(三)堆排序及有界堆排序Java实现及分析
1.堆排序基数排序适用于大小有界的东西,除了他之外,还有一种你可能遇到的其它专用排序算法:有界堆排序.如果你在处理非常大的数据集,你想要得到前 10 个或者前k个元素,其中k远小于n,它是很有用的. ...