percona-toolkit系列
下载地址http://www.percona.com/redir/downloads/percona-toolkit/LATEST/RPM/percona-toolkit-2.2.12-1.noarch.rpm安装:[root@goolen goolen]# ls percona-toolkit-2.2.12-1.noarch.rpm percona-toolkit-2.2.12-1.noarch.rpm[root@goolen goolen]# rpm -ivh percona-toolkit-2.2.12-1.noarch.rpm命令集:[...
default-character-set参数导致MHA启动失败
启动MHA的时候,进程报错退出:[root@test11g ~]# masterha_check_status --conf=/etc/masterha/mha.cnf mha is stopped(2:NOT_RUNNING).[root@test11g ~]# nohup masterha_manager --conf=/etc/masterha/mha.cnf --remove_dead_master_conf --ignore_last_failover < /dev/null > /tol/mha/log/manager.log 2>&1 ...
MHA自动failover测试系列-master主机关机,MHA的切换
环境:Master:192.168.100.50Slave1:192.168.100.48Slave2:192.168.100.141(MHA管理节点)[root@test11g ~]# masterha_check_status --conf=/etc/masterha/mha.cnf mha (pid:19234) is running(0:PING_OK), master:192.168.100.50+++master上执行关机命令[root@goolen ~]# init 0[root@test11g log]# ...
MHA启动过程
环境:Master:192.168.100.50Slave1:192.168.100.48Slave2:192.168.100.141(MHA管理节点)[root@test11g log]# tail -f mha.log Thu Nov 20 17:51:50 2014 - [info] MHA::MasterMonitor version 0.56.Thu Nov 20 17:51:50 2014 - [info] GTID failover mode = 0Thu Nov 20 17:51:50 2014 - [info] Dead S...
MHA状况检查
环境:Master:192.168.100.50Slave1:192.168.100.48Slave2:192.168.100.141(MHA管理节点)+++检查SSH的配置[root@test11g masterha]# masterha_check_ssh --conf=/etc/masterha/mha.cnf Thu Nov 20 17:56:24 2014 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping....
MHA在线切换
环境:Master:192.168.100.48Slave1:192.168.100.50Slave2:192.168.100.141(MHA管理节点)+++停掉MHA监控[root@test11g masterha]# masterha_stop --conf=/etc/masterha/mha.cnf+++切换:[root@test11g masterha]# masterha_master_switch --conf=/etc/masterha/mha.cnf --master_state=alive --new_master_h...
MHA自动failover测试系列-主库mysql进程异常down掉后的切换过程
环境:Master:192.168.100.50Slave1:192.168.100.48Slave2:192.168.100.141(MHA管理节点)模拟主库mysql进程异常down掉,MHA的整个切换过程主库上kill掉mysql进程[root@goolen ~]# ps aux | grep mysql |grep -v grep | awk '{print $2}' | xargs kill -9观察MHA切换日志,了解整个切换过程:[root@test11g...
Unknown/unsupported storage engine: InnoDB
启动mysql 从库的时候报错:# /etc/init.d/mysqld startStarting MySQL (Percona Server)............................................................The server quit without updating PID file (/tol/mysql/d[FAILED]db.pid).查看错误日志:# tail -30f mysql.err InnoDB: Unable to lock ./ibdata1, erro...
greenplum安装(单机环境)
1,前期系统准备操作系统信息:[root@goolen goolen]# cat /etc/issueRed Hat Enterprise Linux Server release 6.3 (Santiago)Kernel \r on an \m[root@goolen goolen]# uname -aLinux goolen 2.6.32-279.el6.x86_64 #1 SMP Wed Jun 13 18:24:36 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux创建用户和组 gpadmin&n...
ERROR 1093 (HY000): You can't specify target table 'a' for update in FROM clause
开发的问我一个mysql 执行update语句报错的问题模拟测试语句如下:mysql> update g10 a set a.l = (select max(b.l) + 1 from g10 b where b.c = 1 and b.p = 3 ) -> where a.c = 1 and a.p = 3;报错如下ERROR 1093 (HY000): You can't specify target table 'a' for update in FROM clausemysql对这...
ogg配置完gettruncates参数后不生效
今天配置了一下让ogg抓取truncate操作,加完gettruncates参数后重启完进程,测试一直没有生效,最后检查发现是源端oracle库没有关闭回收站导致,小记一下。
OGG-01172 exceeded max bytes (50000000)
检查发现ogg 目标端的rep1进程状态不正常GGSCI (release-mysql) 49> info allProgram Status Group Lag at Chkpt Time Since ChkptMANAGER RUNNING  ...
add supplemental log 执行很慢
今天配置ogg,对源端oracle配置追加日志的时候,命令长时间挂起:SQL> alter database add supplemental log data;长时间挂起alter日志如下:Thu Oct 23 10:14:35 2014alter database add supplemental log dataSUPLOG: Previous supplemental logging attributes at scn = 11000495655SUPLOG: minimal = OFF...
ORA-00119: invalid specification for system parameter LOCAL_LISTENER
好长没有安装oracle了,今天安装一套11g的库,启动报错如下:SQL> startupORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instanceORA-00119: invalid specification for system parameter LOCAL_LISTENERORA-00130: invalid listener address '(ADDRESS=(PROTOCOL=TCP)(HOST=kvm-image)(PORT=15...
ORA-39038
今天一朋友说expdp导出数据报错,模拟如下:[oracle@goolen ~]$ expdp system/oracle directory=dump_dir exclude=schema:"in\(\'user1\',\'user2\',\'user3\'\)" dumpfile=a.dmp Export: Release 10.2.0.4.0 - 64bit Production on Thursday, 18 September, 2014 13:39:06Copyright (c) 2003, 2007, Oracle. ...
varchar类型的字段存储纯数字的排序
如果表字段的类型为varchar型,但是里面存储的是纯数字,怎么实现按照数字的大小来排序?下面的方法对于mysql和oracle都实用order by 字段+0order by 字段*1等等都可以实现例子:Mysql:mysql> select * from goolen;+------+| id |+------+| 1 || 2 || 3 ||...
Mysql里特殊的排序方法
刚刚遇到个特殊需求,如下查询,先根据ddate和money排序查询出10条数据,但是如果查询出来的记录的id中包含特殊id,如vip会员的id,需要排序到最前面;mysql> select id,money,ddate,type,size from pincome order by ddate desc,money desc limit 10; +...
注意Oracle与Mysql中的null值
在mysql中,null与''是不相同的,''会插入一个空字符串mysql> select version();+------------+| version() |+------------+| 5.5.18-log |+------------+1 row in set (0.00 sec)mysql> create table goolen (name varchar(10) primary key); Query OK, 0 rows affected (0.03 sec)mysql> insert i...
master and slave have equal MySQL server ids
今天看到一网友在群里发的mysql从库无法进行同步,查看状态,报如下错误:Slave_IO_Running: NoSlave_SQL_Running: YesLast_IO_Error: Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same...
File './mysql-bin.index' not found (Errcode: 13)
今天做一个mysql的备机,拷贝数据的过程出现了一点点权限问题,记录一下数据copy完成之后启动备库[root@localhost data]# /etc/init.d/mysql startStarting MySQL (Percona Server).The server quit without upd[FAILED]D file (/tol/mysql/data/localhost.localdomain.pid).查看错误日志[root@localhost data]# cat...