xtrabackup备份方式搭建一个mysql slave
[root@db-2-43 ~]# cd /usr/src/
[root@db-2-43 src]# wget http://www.percona.com/redir/downloads/XtraBackup/LATEST/binary/Linux/x86_64/percona-xtrabackup-2.1.5-680-Linux-x86_64.tar.gz
[root@db-2-43 src]# tar zxvf percona-xtrabackup-2.1.5-680-Linux-x86_64.tar.gz
[root@db-2-43 src]# cp percona-xtrabackup-2.1.5-Linux-x86_64/bin/* /data/mysql/bin/
[root@db-2-43 DBD-mysql-4.023]# yum -y install perl-DBD-MySQL.x86_64
# wget http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-1.628.tar.gz
# tar zxvf DBI-1.628.tar.gz
# cd DBI-1.628
# perl Makefile.PL
# make && make install
# wget http://search.cpan.org/CPAN/authors/id/C/CA/CAPTTOFU/DBD-mysql-4.023.tar.gz
# tar zxvf DBD-mysql-4.023.tar.gz
# cd DBD-mysql-4.023
# perl Makefile.PL --libs="-L/data/mysql/lib -lmysqlclient -lz -lrt -lcrypt -lnsl -lm" --cflags=" -I/data/mysql/include/"
# make && make install
[root@db-2-43 data]# innobackupex --user=root --password= root --port=3306 --defaults-file=/etc/my.cnf --slave-info --socket=/data/mysql/data/mysql.sock --no-timestamp /data/backup/pis_slave
# innobackupex --apply-log /data/backup/pis_slave/
mysqld_safe --user=mysql --ledir=/data/mysql/bin/ &
[root@db-3-5 pis_slave]# cat xtrabackup_slave_info
CHANGE MASTER TO MASTER_LOG_FILE='mysql-bin.012434', MASTER_LOG_POS=525181886
14:30:53 (none)>CHANGE MASTER TO
-> MASTER_HOST='10.0.2.44',
-> MASTER_USER='repl',
-> MASTER_PASSWORD='repl',
-> MASTER_PORT=3306,
-> MASTER_LOG_FILE='mysql-bin.012434',
-> MASTER_LOG_POS=525181886,
-> MASTER_CONNECT_RETRY=10;
14:33:00 (none)> start slave;
xtrabackup备份方式搭建一个mysql slave的更多相关文章
- Spring框架——事务管理方式搭建一个小的项目
学习Spring框架,通过事务管理的方式搭建一个小的项目,该项目可以查询对数据库中的图书库存数量进行修改. 首先,使用MVC分层的设计模式思想搭建项目目录结构. 此部分代码源码之中都有相关注释,所以尽 ...
- 如何搭建一个 MySQL 分布式集群
1.准备集群搭建环境 使用6台虚拟机来搭建 MySQL分布式集群 ,相应的实验环境与对应的MySQL节点之间的对应关系如下图所示: 管理节点(MGM):这类节点的作用是管理MySQLCluster内的 ...
- 为MySQL选择合适的备份方式
数据库的备份是极其重要的事情.如果没有备份,遇到下列情况就会抓狂: UPDATE or DELETE whitout where… table was DROPPed accidentally… IN ...
- 选择适用才最好 盘点MySQL备份方式
我们要备份什么? 一般情况下, 我们需要备份的数据分为以下几种 数据 二进制日志, InnoDB事务日志 代码(存储过程.存储函数.触发器.事件调度器) 服务器配置文件 备份工具 这里我们列举出常用的 ...
- Docker 搭建 Tomcat + Mysql
Docker 搭建 Tomcat + Mysql 准备 虚拟机 虚拟机安装Docker 在纯净的Centos镜像上搭建 Centos镜像准备 虚拟机上拉取 Centos 镜像: docker pull ...
- PXC备份方式总结
记录一下. 1.mysqldump数据导出 关于GTID: GTID是MySQL5.6以后,加入了全局事务 ID (GTID) 来强化数据库的主备一致性,故障恢复,以及容错能力. A global t ...
- 搭建一个webpack微服务器
[前言]:因为最近在vue2.0的时候用到了webpack的externals,才发现我之前都只是用webpack做一些搭建完项目后的“收尾工作”——即打包,而没有把它纳入到项目开发的“主体过程”中来 ...
- Spring框架——JDBC方式搭建项目
学习Spring框架,使用JDBC的方式配置方式搭建一个项目,进行项目总结. 首先,采用MVC设计模式思想,搭建项目目录. 然后各个目录文件下面的相关源码附上: controller目录: impor ...
- innobackupex 备份数据搭建 MySQL Slave
简介: 数据量比较大时,使用 innobackupex 备份数据新增 MySQL Slave 节点. 安装 innobackupex 工具,我这里写过一次:http://www.cnblogs.com ...
随机推荐
- [转]Android中自定义checkbox样式
android中自定义checkbox的图片和大小 其实很简单,分三步: 1.在drawable中创建文件checkbox_selector.xml: <?xml version=" ...
- 动软代码生成器连接Oracle 11g
首先要说明的是:如果你连接的是远程的Oracle服务器,你本地机器必须装Oracle客户端,然后 用sqldeveloper 先建立一个连接. 然后你才能用.NET动软代码生成器连接到数据库. 因 ...
- Nginx反向代理 实现Web负载均衡
实现负载均衡的方式有很多种,DNS.反向代理.LVS负载均衡器(软件实现).F5(负载均衡器,硬件,非常昂贵)这里我们只提到基于DNS,以及反向代理的方式来实现负载均衡Web服务 DNS服 ...
- Inverted bipolar transistor doubles as a signal clamp
A number of circuits, such as level detectors and AM demodulators, benefit from a rectifier with a l ...
- Visual Studio 2010 使用 Git Extensions 连接 google code
下载最新版本 Git Extensions http://code.google.com/p/gitextensions/downloads/list Git Extensions 2.46 Wind ...
- R类
资源文件的使用分为在代码中使用和在其他资源文件中引用该资源文件.在我们编译一个Android应用时,Android会自动生成一个R类,在该类中根据不同的资源类型又生成了相应的内部类,该类包含了系统中使 ...
- Git 报错:git - error: RPC failed; curl 18 transfer closed with outstanding read data remaining 解决方案
error: RPC failed; curl 18 transfer closed with outstanding read data remaining because have error w ...
- 深入解析OkHttp3
OkHttp是一个精巧的网络请求库,有如下特性: 1)支持http2,对一台机器的所有请求共享同一个socket 2)内置连接池,支持连接复用,减少延迟 3)支持透明的gzip压缩响应体 4) ...
- Nuget server on IIS6 returns 404
Nuget server on IIS6 returns 404 when downloading package after upgrade 2011年9月2日 8:03:30 (GMT Dayli ...
- longest-palindrome
https://leetcode.com/problems/longest-palindrome/ public class Solution { public int longestPalindro ...