E212: Can't open file for writing
刚刚用root编辑一个文件[root@php-11 ~]# vim /tol/task/dump_weixinnew_everyday.sh完事后想要保存退出,但是一直报错,不让保存,很纳闷了,root都没权限保存检查一下磁盘空间,还剩余很多再检查才发现编辑的这个文件所在的路径task目录不存在导致,创建task目录后就可以保存了很有意思,记录一下[root@php-11 ~...
xtrabackup-安装
安装 http://www.percona.com/downloads/XtraBackup/XtraBackup-2.1.6/binary/Linux/x86_64/[root@goolen ~]# ls percona-xtrabackup-2.1.6-702-Linux-x86_64.tar.gz percona-xtrabackup-2.1.6-702-Linux-x86_64.tar.gz[root@goolen ~]# tar zxfv percona-xtrabackup-2.1.6-702-Linux-x86_64.tar.gz ...
percona-toolkit系列-pt-find
pt-find - Find MySQL tables and execute actions, like GNU find.用法:pt-find [OPTION...] [DATABASE...]例子:找出创建于一天之前,并且是myisam存储引擎的表[root@goolen ~]# pt-find --ctime +1 --engine MyISAM -uroot -proot`mysql`.`db``mysql`.`event``mysql`.`func``mysql`.`help_category``mysql...
用sed和echo处理文本
最近有个朋友要处理一些文本数据原始数据大概如下:[root@goolen goolen]# cat haiqing.log a,b,c,d,20141123,121010a,b,c,d,20141124,121011a,h,d,d,20141125,121012a,g,g,w,20141126,121013a,d,h,e,20141127,121014a,x,u,r,20141128,121015他需要把把后面的日期改为yyyy-mm-dd的格式,时间改为HH:MI:SS的...
percona-toolkit系列-pt-archiver
pt-archiver工具其实就是用来清理,归档数据用的下面列举了三种常用的功能1,只清理数据mysql> use sbDatabase changedmysql> select * from sb2;+----+------+| id | name |+----+------+| 1 | a || 2 | b || 3 | c || 4 | d |...
ORA-31633: unable to create master table "NEWCOURSE.JOB_48"
早上来公司,发现内网同步的数据失败了,检查了一下日志,报错信息如下:ORA-31626: job does not existORA-31633: unable to create master table "NEWCOURSE.JOB_48"ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95ORA-06512: at "SYS.KUPV$FT", line 1020ORA-00955: name is already used by an existing object同...
percona-toolkit系列-pt-align
pt-align这个工具用于对文件格式进行格式化输出例子:对比align文件格式化输出前后,文件格式的不同[root@goolen goolen]# pt-align --helppt-align aligns output from other tools to columns. If no FILES are specified,STDIN is read. For more details, please use the --help option, or try 'p...
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...