percona

Mysql ibd恢复(delete 数据)

橙三吉。 提交于 2019-11-30 22:29:18
转载: https://www.linuxidc.com/Linux/2017-05/143870.htm 首先呢,请各位注意Percona Data Recovery Tool for InnoDB工具的适用范围: 1)本次应用的恢复工具仅适用与innodb存储引擎,Myisam不支持 2)Truncate tabe 不能恢复 3)Drop table 想也别想了 恢复原理: 对于INNODB存储引擎而言,DELETE操作,不是真正删除物理文件上的行,而是给删除的行添加了一个删除的标记,我们利用此工具找到那些标注了删除标记的行,然后将其存放到一个文本中去,最后通过load data恢复数据;而truncate操作,是直接将数据行清空,并非添加删除标记(查看物理文件,执行truncate的表的ibd文件会缩小,而执行了DELETE的表,甚至比之前大) 正文开始: 下载:percona-data-recovery-tool-for-innodb-0.5.tar.gz wget https://launchpad.net/percona-data-recovery-tool-for-innodb/trunk/release-0.5/+download/percona-data-recovery-tool-for-innodb-0.5.tar.gz 安装 yum -y install

Percona XtraDB Cluster vs Galera Cluster vs MySQL Group Replication

旧巷老猫 提交于 2019-11-30 14:36:15
Overview Galera Cluster Percona XtraDB Cluster MySQL Group Replication MySQL InnoDB Cluster Similarities Similar - Use Cases Similar Limitation Differences GR & Galera Group Communication System 组通信系统 Binlogs & Gcache Node Provisioning 节点配置 GTID vs. Seqno Partition Handling Full Solution or Plugin Flow Control 流控制 WAN Support OS Support Schema Changes - DDL Differences PXC & Galera PXC Strict Mode ProxySQL 集成 性能提升 Limitations Known Issues Galera Cluster/PXC Issues Group Replication Issues 分区容忍问题,不能防止脑裂 减少冲突 稳定性 可用性 Q & A Performance Tests Overview Galera Cluster 由 Coder<!---->ship 开发 官网

MySQL Fatal error: Can't open and lock privilege tables: Incorrect file format 'user'

亡梦爱人 提交于 2019-11-30 13:01:50
MySQL (Percona 5.6) will not start. This error has happened to me several times. Each time, I have had to remove MySQL data directories and reinstall MySQL. Is there another way to fix MySQL? (Specifically one in which the data not blown away?) /var/log/mysql/error.log 150214 16:36:39 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 2015-02-14 16:36:40 0 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead. 2015-02-14 16:36:40 0 [Warning] 'THREAD_CONCURRENCY' is

Installing Percona/MySQL unattended on Ubuntu

吃可爱长大的小学妹 提交于 2019-11-30 12:01:45
问题 I can install MYSQL on Ubuntu without prompts with the code below: dbpass="mydbpassword" export DEBIAN_FRONTEND=noninteractive echo mysql-server-5.1 mysql-server/root_password password $dbpass | debconf-set-selections echo mysql-server-5.1 mysql-server/root_password_again password $dbpass | debconf-set-selections apt-get -y install mysql-server The part with the debconf-set-selections I got somewhere online (could be here can't remember) and it has worked ok for me thus far. I'm not that much

Installing Percona/MySQL unattended on Ubuntu

混江龙づ霸主 提交于 2019-11-30 01:54:50
I can install MYSQL on Ubuntu without prompts with the code below: dbpass="mydbpassword" export DEBIAN_FRONTEND=noninteractive echo mysql-server-5.1 mysql-server/root_password password $dbpass | debconf-set-selections echo mysql-server-5.1 mysql-server/root_password_again password $dbpass | debconf-set-selections apt-get -y install mysql-server The part with the debconf-set-selections I got somewhere online (could be here can't remember) and it has worked ok for me thus far. I'm not that much of an expert to understand how it works but it does. However, I want to do the same thing for Percona.

/var/lib/zabbix/percona/scripts/get_mysql_stats_wrapper.sh: line 19: mysql: command not found

我怕爱的太早我们不能终老 提交于 2019-11-29 06:53:51
[root@test ~]# tail -f /tmp/zabbix_agentd.log /var/lib/zabbix/percona/scripts/get_mysql_stats_wrapper.sh: line 19: mysql: command not found vi /var/lib/zabbix/percona/scripts/get_mysql_stats_wrapper.sh: line RES=`/usr/local/mysql/bin/mysql -uroot -p'123456' -e 'SHOW SLAVE STATUS\G' | egrep 'Slave_IO_Running|Slave_SQL_Running' | awk -F: '{print $2}' | tr '\n' ','` if [ "$RES" = " Yes, Yes," ]; then echo 1 else echo 0 fi "/var/lib/zabbix/percona/scripts/get_mysql_stats_wrapper.sh" 43L, 1279C written [root@test ~]# tail -f /tmp/zabbix_agentd.log /var/lib/zabbix/percona/scripts/get_mysql_stats

配置MySQL5.7基于GTID的复制

邮差的信 提交于 2019-11-29 04:42:57
配置MySQL5.7基于GTID的复制 一、 安装前规划 1.1 大体架构规划如下 master 192.168.9.71:3306 Slave 192.168.9.72:3306 数据库搭建过程请参考《mysql5.7部署文档》 二、 主从复制搭建 2.1 创建同步用户repl(master上) grant replication slave on *.* to 'repl'@'%' identified by '123456'; flush privileges; 注:其中'repl'@'%'部分可以修改为'repl'@'xxx.xxx.xxx.*'或'repl'@'xxx.xxx.xxx.xxx'的形式,出于安全目的用以限制网段或IP访问(其中xxx为具体IP) 2.2 主库my.cnf添加同步参数 server_id=1 log-bin = /mysql/3306/binlog/bin.log #binlog 存放路径,需要根据实际情况修改 log_bin_index = /mysql/3306/binlog/bin.index max-binlog-size=209715200 expire-logs-days = 7 sync-binlog = 1 binlog_format="ROW" log_bin_trust_function_creators = 1

MySQL之Xtrabackup的使用

早过忘川 提交于 2019-11-28 07:11:00
一、Xtrabackup介绍 XtraBackup(PXB) 工具是 Percona 公司用 perl 语言开发的一个用于 MySQL 数据库物理热备的备份工具,支持 MySQl(Oracle) 、 Percona Server 和 MariaDB ,并且全部开源。 1.1 Xtrabackup 优点 1)备份速度快,物理备份可靠 2)备份过程不会打断正在执行的事务(无需锁表) 3)能够基于压缩等功能节约磁盘空间和流量 4)自动备份校验 5)还原速度快 6)可以流传将备份传输到另外一台机器上 7)在不增加服务器负载的情况备份数据 1.2 Xtrabackup备份原理 备份开始时首先会开启一个后台检测进程,实时检测mysq redo的变化,一旦发现有新的日志写入,立刻将日志记入后台日志文件xtrabackup_log中,之后复制innodb的数据文件一系统表空间文件ibdatax,复制结束后,将执行flush tables with readlock,然后复制.frm MYI MYD等文件,最后执行unlock tables,最终停止xtrabackup_log。 1.3 增量备份介绍: 1)、首先完成一个完全备份,并记录下此时检查点LSN; 2)、然后增量备份时,比较表空间中每个页的LSN是否大于上次备份的LSN,若是则备份该页并记录当前检查点的LSN。 增量备份优点: 1)

percona-server-5.6.25-73.1安装笔记---编译篇

余生颓废 提交于 2019-11-27 19:13:57
服务器环境:CentOS6.5最小化安装 内存:4GB 1.percona-server-5.6.25-73.1.tar.gz及cmake下载: wget https://www.percona.com/downloads/Percona-Server-5.6/Percona-Server-5.6.25-73.1/source/tarball/percona-server-5.6.25-73.1.tar.gz wget http://www.cmake.org/files/v2.8/cmake-2.8.12.1.tar.gz 2.安装GCC编译环境 yum -y install make gcc-c++ cmake bison-devel ncurses-devel 3.安装CMAKE编译环境,percona-server-5.6.25需要使用cmake来编译 tar zxvf cmake-2.8.12.1.tar.gz cd cmake-2.8.12.1 ./bootstarp make make install 4.添加MYSQL用户及用户组 [root@localhost src]# groupadd mysql [root@localhost src]# useradd -g mysql -s /sbin/nologin -M mysql 5

MySQL Fatal error: Can't open and lock privilege tables: Incorrect file format 'user'

一曲冷凌霜 提交于 2019-11-27 18:18:28
问题 MySQL (Percona 5.6) will not start. This error has happened to me several times. Each time, I have had to remove MySQL data directories and reinstall MySQL. Is there another way to fix MySQL? (Specifically one in which the data not blown away?) /var/log/mysql/error.log 150214 16:36:39 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 2015-02-14 16:36:40 0 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a