共 11 篇文章 |
|
阅36 转0 评0 公众公开 14-11-28 14:21 |
slave问题汇总<一> : slave 自动化修复统计slave中断的错误类型:Query: ''drop table `edu_class_course`,`edu_phone_subject`,`edu_goods_borrow_return`,`edu_optional_courses_cfg`,`sys_dictionary_complex`,`v_class_student`,`edu_head_family`,`sys_privilege_list_all`,`edu_user`,`edu_qxszjy_pic`,`edu_exam_student`... 阅4526 转19 评0 公众公开 14-11-28 13:56 |
then errlist=${errlist},${my_port}=${res} fi fi done errlist=$(echo $errlist | sed ''s/^,//'') if [ -z "$errlist" ] ;then ## No slave configed or thread is running .status is OK : else errlist=$errlist,... 阅96 转0 评0 公众公开 14-11-28 13:27 |
阅44 转0 评0 公众公开 14-11-28 13:26 |
阅72 转0 评0 公众公开 14-11-28 13:25 |
"echo $change_slave_postion$conn "$change_slave_postion"$conn "start slave"is_ok=$($conn "show slave status\G"|grep Seconds_Behind_Master|awk -F '':'' ''{print $2}''| tr -d '' '')sleep 1if [ "$is_ok" -ge "0" ]; 阅33 转0 评0 公众公开 14-11-28 13:23 |
/bin/shcount=0port=$1skip_table=$2sum=0while truedo id=`mysql -uroot -h127.0.0.1 -P$port -Ne "show slave status\G" | grep "$skip_table" | head -1 | awk -F" "''{print $1}''` if [ -z $id ];fi mysql -uroot -h127.0.0.1 -P$port -e "set global sql_slave_skip_counter... 阅48 转0 评0 公众公开 14-11-28 13:22 |
shell计算文件中包含一个匹配字符的次数?应用场景:1. binlog里可能解析出来大量的update,但我想知道通过一个update的次数如何来做。a. 通过sed 模糊查询[root@iZ234rd7qqgZ mysql]# sed -n ''/update/p'' a.sql | wc -l31这个文件里包含了update的有31条;b. 通过sed 替换[root@iZ234rd7qqgZ mysql]# sed -i ''s/33... 阅1251 转0 评0 公众公开 14-11-10 15:21 |
linux 线上问题统一记录1.linux上su到mysql用户竟然是bash环境 解决办法:将root根目录下的.bashrc文件和.bashprofile 拷贝到mysql目录下即可2. 阅42 转0 评0 公众公开 13-12-17 14:59 |