I. Pre-trial planning:Lab Environment: CentOS-6.5Database: Mysql-5.6.19Virtual machines: VMware Workstation 10Network topology structure:Three nodes are not master1,master2,slave. where Master1 and Master2 do a dual master copy of MySQL, slave nodes
1.1 Environment Construction
Prepare two Windows NT hosts, install Ikey Server Windows version, make sure the version is correct, ensure the MySQL service starts properly, make sure that the two hosts are in the same LAN, determine which one is the
Today found MySQL's master-slave database is not synchronized
first the Master library:
Mysql>show processlist; Check to see if the process is too much sleep. Found to be normal.
Show master status; is normal.
Mysql> Show master status;
+-----------
1. Server StatusServer a:192.168.1.1Server b:192.168.1.2
2. Create a synchronization userHost Domain a:192.168.1.2 username a:sync_a password a:aaaHost Domain b:192.168.1.1 username b:sync_b password b:bbbAssign at least the following permissions
Master-Slave synchronization in LinuxPrimary server ip:250.110.120.119IP:110.120.119.250 from server
1. Create a new user on the primary server and use it synchronously from the server.
The code is as follows
Copy Code
1. Preparatory workConfiguration environment: centos6.9,mysql5.7Install and configure two MySQL servers first.Server1 ip:192.168.1.1Server2 ip:192.168.1.2For MySQL installation Please refer to the previous article:Lamp Environment Construction
mysql-master1:192.168.72.128mysql-master2:192.168.72.129OS Version: CentOS 5.4MySQL version: 5.5.9 (master and master copy are the same as the MySQL version in the slave server or the master version is higher than the slave version)First, MySQL
1. Two MySQL can read and write, the main preparation, the default is only one (Mastera) responsible for data writing, the other (Masterb) standby;2. Mastera is the main library of Masterb, Masterb is the main library of Mastera, they are mainly
Restore data with backup +binlog.
Scene: Last night was made fully prepared, this morning the user accidentally deleted a table by mistake.
Solution: It is not recommended to restore directly in the original production environment, it is
Mysql master-slave replication configuration steps: We recommend that you use the same version for the master server and slave server. In many cases, copying from the new master server to the old slave server will fail. In general, a master with a
Install environment OS: CentOS6.5 database version: MySQL5.6.27 host A: 192.168.1.1 (Master) host B: 192.168.1.2 (Slave) The database version emphasized here, the reason is that the installation method before and after MySQL 5.6 is different. I
Mysql master-slave replication principle and configuration, mysql master-slave Principle
Mysql master-slave replication principle and Configuration
1.OverviewThe built-in replication function of Mysql is the basis for building large and
Mysql master-slave copy notes, mysql master-slave notes
I. Introduction to the test environment
The master-slave replication test environment is ubuntu + mysql5.7, the master server ip address is 192.168.71.135, the slave server ip address is 192.168
Three methods for mysql backup: bitsCN.com
I. purpose of backup
Disaster Recovery: recover and restore damaged dataDemand Change: data needs to be restored to a time before the change due to demand changesTest: test whether the new function is
Environment:The MySQL database version on the master and slave servers is 5.1.34.Host IP: 192.168.0.1Slave IP Address: 192.168.0.21. MySQL master server configuration1. Edit the configuration file/etc/my. cnf# Make sure it is as downstreamServer-id =
Mysql master-slave installation configuration environment: the MySQL database version on the master-slave server is 5.1.34 Host IP Address: 192.168.0.1 slave IP Address: 192.168.0.2I. mySQL master server configuration 1. edit the configuration
I. Purpose of backup
Disaster recovery: recover and restore damaged dataDemand change: data needs to be restored to a time before the change due to demand changesTest: test whether the new function is available
Ii. Backup considerations
How long
Mysql Master/Slave databases are not synchronized todayFirst go to the Master database:Mysql> show processlist; check whether there are too many Sleep processes. It is normal.Show master status; also normal.Mysql> show master status;+ ---------------
1. server Status server A: 192.168.1.1 server B: 192.168.1.22. create A synchronous user host Domain A: 192.168.1.2 User Name A: sync_a Password A: aaa host Domain B: 192.168.1.1 user name B: sync_ B password B: bbb at least assign the following
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.