How To Repair MySQL Replication
If you have set up MySQL replication, you probably know this problem: sometimes there are invalid MySQL queries which cause the replication to not work anymore. In this short guide I explain how you can repair the replication on the MySQL slave without the need to set it up from scratch again.
1. Identifying The Problem
To find out whether replication is/is not working and what...
Thứ Tư, 25 tháng 10, 2017
Fixing MySQL replication after slaves’s relay log was corrupted
MySQL replication on slave (version 5.1.61) has stopped. Slave_IO_Running was marked as Yes, but Slave_SQL_Running as No. Simple stop/start slave didn’t help so further problem analysis was needed. It seemed that current slave’s relay log was corrupted because testing with “mysqlbinlog” has printed out an error. Therefore, the solution was to discard current relay binlogs and to point slave to the last master binlog position.Here...
Thứ Hai, 23 tháng 10, 2017
Ubuntu 14.04 not booting after error message. /tmp could not be mounted
Ubuntu 14.04 not booting after error message. /tmp could not be mounted
If you installed Ubuntu 14.04 using WUBI and after installation when it booted it showed an error:
Serious errors were found while checking the disk drive for /.
There were three options:
press [I] to ignore, press [S] to skip mounting and press [M] to mount manually.
After pressed I, it showed /tmp could not be mounted and my Ubuntu...
Thứ Tư, 18 tháng 10, 2017
Dumping and importing from/to MySQL in an UTF-8 safe way
Dumping and importing from/to MySQL in an UTF-8 safe way
In a nutshell: to avoid your shell character set from messing with imports, use -r to export and SOURCE when importing.
Dumping safely
COPY
# Do not do this, since it might screw up encoding
mysqldump -uroot -p database > utf8.dump # this is bad
Better do:
COPY
mysqldump -uroot -p database -r utf8.dump
Note that when your MySQL server is not set...
[Monitoring] Cài đặt Nagios trên CentOS7
[root@svr-alert ~]#yum update -y && yum groupinstall "Development Tools" -y
[root@svr-alert ~]#yum install vim wget net-tools -y
[root@svr-alert ~]#vim /etc/sysconfig/selinux => Disabled
[root@svr-alert ~]# systemctl stop firewalld
[root@svr-alert ~]#systemctl disable firewalld
[1] Cài package:
[root@svr-alert ~]#yum install perl wget httpd php gcc glibc glibc-common gd gd-devel
[root@svr-alert ~]#yum install openssl-devel...
Một cách để phục hồi mysql replication break
Giới thiệu
Khi mysql replication bị hỏng thì có rất nhiều cách để xử lý nhưng có một cách tốt hơn cả là có thể bê nguyên toàn bộ data của master về slave ngay lập tức và tái lập replication bắt đầu tại thời điểm chuyển toàn bộ data sang. Rất may, percona xtrabackup có thể được tận dụng để làm việc đó.
Một số điểm chú ý
Bạn không cần phải down master nhưng vẫn cần phải down slave. Thời gian slave down cũng không quá lâu nên...
Đăng ký:
Bài đăng (Atom)