percona

Percona's pt-table-sync: how to run on more than one table?

耗尽温柔 提交于 2019-12-07 05:04:47
问题 In the command line, this will successfully update table1: pt-table-sync --execute h=host1,D=db1,t=table1 h=host2,D=db2 However if I want to update more than one table, I'm not sure how to write it. This only updates table1 as well and ignores the other tables: pt-table-sync --execute h=host1,D=db1,t=table1,table2,table3 h=host2,D=db2 And this gives me an error: pt-table-sync --execute h=host1,D=db1 --tables table1,table2,table3 h=host2,D=db2 Anyone have an example of how to list the '-tables

Mysql-Percona mysql5.7简单安装

柔情痞子 提交于 2019-12-06 16:10:17
Mysql-Percona mysql5.7简单安装 一、什么是Percona 单从mysql的角度来讲,可以把Percona理解为mysql的一个分支,因为mysql的源码是开源的,Percona就是在源码基础上对mysql做了一些改进,逐渐发展成了一条分支。其他分支还有mariadb等,都是mysql的分支,作为基础使用者,了解这么多就可以了,后续想深入了解,去看书吧。 二、Mysql5.7安装准备 1.基础信息: (1)可参考官方文档【https://www.percona.com/doc/percona-server/5.7/installation/yum_repo.html】 (2)环境信息 系统:Centos7.3 Mysql:Percona的Mysql5.7 2.安装方式: 这里选择yum安装,原因是没有特殊需求,yum安装比较快 三、部署Mysql5.7 1.关闭selinux及firewalld防火墙 如果不关闭,启动会受到影响!!!别问我为什么知道!!! sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/sysconfig/selinux setenforce 0  #关闭Selinux(强烈建议关闭) systemctl stop firewalld systemctl disable

PHP PDO returning inconsistent results for SELECT FOUND_ROWS()

我是研究僧i 提交于 2019-12-06 10:49:58
问题 I have an issue with PHP/PDO and MySQL When I run a query with SQL_CALC_FOUND_ROWS and then select FOUND_ROWS(), 80% of the time its returning 0, and the rest of the time FOUND_ROWS is accurate I've reduced it to a simple test loop, but this works fine on my dev server, but in production the test case is having the inconsistency problem. Running the same queries from MySQL command line works correctly even in production, so it appears to be a PHP/PDO problem PHP 5.5.28 - using mysqlnd 5.0.11

MySQL集群高可用

佐手、 提交于 2019-12-06 10:39:56
目录 MySQL高可用 Galera Cluster Galera Cluster Galera Cluster特点 Galera Cluster 缺点 Galera Cluster工作过程 Galera Cluster官方文档 Galera Cluster包括两个组件 WSREP复制实现 PXC 原理 PXC最常使用如下4个端口号: PXC中涉及到的重要概念和核心参数: 实战案例:Percona XtraDB Cluster(PXC 5.7) 在PXC集群中加入节点 在PXC集群中修复故障节点 实现MariaDB Galera Cluster 复制的问题和解决方案 性能衡量指标 数据库服务衡量指标: 压力测试工具 常见MySQl压力测试工具 mysqlslap 常用参数 [options] 说明: mysqlslap示例 生产环境 my.cnf 配置案例 MySQL配置最佳实践 MySQL高可用 Galera Cluster Galera Cluster Galera Cluster:集成了Galera插件的MySQL集群,是一种新型的,数据不共享的,高度冗余的高可用方案,目前Galera Cluster有两个版本,分别是Percona Xtradb Cluster及MariaDB Cluster,Galera本身是具有多主特性的,即采用multi-master的集群架构

Galera Cluster 实现mysql的高可用 (Percona XtraDB Cluster)

若如初见. 提交于 2019-12-06 10:35:15
Galera Cluster 实现mysql的高可用 (Percona XtraDB Cluster) # 基础搭建 # 设备:三台主机 192.168.47.101 192.168.47.102 192.168.47.103 # centos7 系统 关闭防火墙 selinux # 设置清华源用于下载 cat >/etc/yum.repos.d/pxe.repo <<eof [percona] name=percona baseurl=https://mirrors.tuna.tsinghua.edu.cn/percona/release/7Server/RPMS/x86_64 gpgcheack=0 eof #拷贝yum源 scp /etc/yum.repos.d/pxe.repo 192.168.47.102:/etc/yum.repos.d/ scp /etc/yum.repos.d/pxe.repo 192.168.47.103:/etc/yum.repos.d/ #192.168.47.101 192.168.47.102 192.168.47.103 都要安装 yum install Percona-XtraDB-Cluster-57 -y #配置mysqld.cnf文件 server-id=1 bin_log #配置wsrep.cnf文件, wsrep

MYSQL的备份与恢复--物理备份xrabackup

 ̄綄美尐妖づ 提交于 2019-12-06 04:24:43
目录 1、数据库完整备份与恢复 (1)环境准备 (2)完全备份恢复流程 2、数据库增量备份与恢复 (1)增量和差异概述 (2)增量备份和恢复 3、数据库差异备份与恢复 4、简单命令进行物理备份 我叫张贺,贪财好色。一名合格的LINUX运维工程师,专注于LINUX的学习和研究,曾负责某中型企业的网站运维工作,爱好佛学和跑步。 个人博客: 传送阵 笔者微信:zhanghe15069028807 percona-xtrabackup 开源免费支持 mysql 热备的软件,支持增量、差异备份。 yum -y install https://www.percona.com/downloads/Percona-XtraBackup-LATEST/Percona-XtraBackup-8.0-8/binary/redhat/7/x86_64/percona-xtrabackup-80-8.0.8-1.el7.x86_64.rpm [root@mysql02 ~]# rpm -ql percona-xtrabackup-80.x86_64 /usr/bin/xbcloud /usr/bin/xbcloud_osenv /usr/bin/xbcrypt /usr/bin/xbstream /usr/bin/xtrabackup /usr/lib64/xtrabackup/plugin/keyring

centos6安装pxc

亡梦爱人 提交于 2019-12-05 23:51:39
Percona XtraDB Cluster是一种高可用性解决方案,可帮助企业避免停机和中断. Percona XtraDB Cluster具有以下MySQL群集优势: • 具有成本效益的HA和MySQL可扩展性 • 更高的可用性 • ProxySQL负载平衡器 • 多原版复制 • 增强的读/写可扩展性 • 零数据丢失 • ProxySQL辅助的Percona XtraDB群集维护模式 • 自动节点配置 • Percona XtraDB群集“严格模式” • Percona监视和管理兼容性 环境:三台centos7 192.168.1.10 192.168.1.20 192.168.1.30 1.安装percona软件包库 yum -y install http://www.percona.com/downloads/percona-release/redhat/0.1-4/percona-release-0.1-4.noarch.rpm 2.更新库 ls /etc/yum.repos.d/ yum clean all yum list | grep percona 3.安装pxc yum install Percona-XtraDB-Cluster-full-57.x86_64 -y 4.启动mysql service mysql start grep password /var

zabbix 3.4应用环境监控(7)

一个人想着一个人 提交于 2019-12-05 13:45:33
Zabbix监控Nginx 实验环境 服务器系统 角色 IP CentOS 7.4 x86_64 Zabbix-Server 192.168.90.10 CentOS 7.4 x86_64 Zabbix-Agent 192.168.90.11 2.在 nginx.conf 的 Server 标签下添加如下内容 location /nginx_status { stub_status on; access_log off; allow 127.0.0.1; deny all; } 3.本地访问 Nginx Status [root@linux-node1 ~]# curl http://127.0.0.1/nginx_status Active connections: 1 server accepts handled requests 1 1 1 Reading: 0 Writing: 1 Waiting: 0 4.编写Nginx的Shell脚本(如果端口不一致,只需要修改脚本端口即可) [root@Agent ~]# mkdir -p /etc/zabbix/scripts [root@linux-node1 scripts]# vim /etc/zabbix/scripts/nginx_status.sh #!/bin/bash ########################

Percona's pt-table-sync: how to run on more than one table?

余生颓废 提交于 2019-12-05 08:23:58
In the command line, this will successfully update table1: pt-table-sync --execute h=host1,D=db1,t=table1 h=host2,D=db2 However if I want to update more than one table, I'm not sure how to write it. This only updates table1 as well and ignores the other tables: pt-table-sync --execute h=host1,D=db1,t=table1,table2,table3 h=host2,D=db2 And this gives me an error: pt-table-sync --execute h=host1,D=db1 --tables table1,table2,table3 h=host2,D=db2 Anyone have an example of how to list the '-tables'... so that it successfully update all the tables in the list? The --tables option seems to be

MySQL 5.6 deadlock for locking the same rows twice?

廉价感情. 提交于 2019-12-05 03:09:07
I am seeing a deadlock with MySQL 5.6 because of what seems like trying to lock the same row/s twice. From the snippet below, rows where id = (11, 12, 13, 14, 15) already have a lock. And when another transaction tried to acquire a lock on these, MySQL failed the transaction detecting a deadlock. Is my reading of this correct? If so, is there anything in MySQL 5.6 to get over this? FWIW, the same code in 5.5 worked just fine (for several hundreds of iterations). ------------------------ LATEST DETECTED DEADLOCK ------------------------ 2013-07-25 11:46:05 13a515000 *** (1) TRANSACTION: