replication, we understand basic information about the binary log files of the master server, which must be used in slave server settings, this information includes the name of the binary file of the master server and the location of the current log record, so that the slave server can know where to start the replication operation. You can use the following oper
The copy operation is done through 3 threads during the MySQL replication process: Where the Binlog dump thread is on the main library, I/O threads and SQL threads are on the slave library, and when replication starts from the library (start SLAVE), the I/O thread first connects to the main library, which is
row, the value is to the newly added library, and then restart the mysql services;4, then through the Linux command to enter MySQL, to see if the slave is properly started, if the boot has an exception to handle, to ensure normal startup; 5, the newly added library to the main master replication chain, test can be;V. How to remove a library from the existing ma
the semisync_slave * file to the plugins folder of all slave databases.
Next, execute the install plugin command on the master database and slave database to load the plug-in.
Mysql> install plugin rpl_semi_sync_master SONAME "semisync_master.so ";
Execute from database
Mysql> install plugin rpl_semi_sync_slave SONAME "semisync_slave.so ";
View the plug-in installation status:
MySQL database master-slave replication bitsCN. the master-slave replication of comMySQL 5.5 Database is studied based on the data on the Internet. The data on the Internet is already very detailed, but I still encountered many problems in practice, the following is a summary based on the information on the Internet and the problems I encountered. System environm
MySQL-master-slave replication bitsCN.com
MySQL replication is often used in the following environments:
1. avoid disaster through hot backup
2. generate reports
Using the slave server to generate reports can greatly reduce the load on the master server.
3 debugging and auditing
For example, check whether some queries
Mysql master-slave replication practicesAsynchronous master-slave Replication
Master-slave deployment steps:
Backup and Restoration
Use mysqldump or xtrabackup
Restore the existing basic data of the master database to the slave Database
Authorization
Grant replication slave on *.*
An accoun
Mysql master-slave replication, mysql master-slave1. mysql master-slave replication Principle
For the master server, the information generated in the current database will be recorded in the binary log. If the server receives a Statement on the client that needs to change th
1. Keepalived43; lvs43; master-master replication of mysql is a common Mysql high-availability solution. lvs provides read load balancing and Keepalived implements automatic failover through virtual vip drift, although Mysql is configured to master-master replication, it gen
server-id of the two slave is the same, then when the latter connection succeeds, slave actively connects to master, if slave stop is performed on slave above, the connection is disconnected but the corresponding thread on master does not exit; when slave After start, master can no longer create a thread and retain the original thread, so synchronization can be problematic;In MySQL master synchronization,
= Test3binlog-ignore-db = MySQLBinlog-ignore-db = Information_schemaSlave-skip-errors=allLog-slave-updatesSymbolic-links=0Skip-name-resolve
The new additions to the B-way my.cnf configuration file are as follows:
################# #replication config#######################Log-bin = Mysql-binAuto-increment-increment = 2Auto-increment-offset = 2Replicate-do-db = Test1Replicate-do
master status" or "mysqldump"-primary data display. In this case, you need to use the log file of the specified slave and the value after the location is null string ('') and 4.
Now you have the information you need to copy the binary logs that are read from the beginning at the correct position.
Set master-slave connection information
Mysql> CHANGE MASTER
-> MASTER_HOST = 'master _ host_name ',
-> MASTER_USER = '
position number.
Iii. Mysql AB replication: (synchronous and asynchronous replication)The following is a one-way hot standby experiment:Master: 192.168.0.57 slave database slave: 192.168.0.95
1. Install mysql on master and slaveYum install mysql-server-y (
automatic log days to prevent a single log file is too large or in MySQL to perform flush logs manual wheel-shaped two Binary log, combined with Crond automatic rotation log. Www.it165.net---------------------------------------------Other common configuration references are as follows: [mysqld] Datadir=/database Basedir=/usr/local/mysql Pid-file=/var/run/mysqld/mysql5.pid Socket=/var/run/mysqld/mysql5.sock
Mysql database master-slave replication deployment notes, mysql master-slave
Principles of master-slave database replication:The master-slave replication of a database is to copy data from the master database to the slave database. The entire replication between the master a
=/data/3306/mysql-binSecond, the MySQL master-slave copy process description1, execute the start slave command on the slave server, turn on the master-slave copy switch, start the master-slave replication.2. At this point, the I/O thread of the slave server connects to the
master server to the slave server before enabling the slave server. So back up the data on the master server # mysqldump -- all-databases -- lock-all-tables -- master-data = 2>/tmp/slave. SQL 2. copy the backup to the slave server # scp/tmp/slave. SQL 172.16.35.2:/tmp/3. import the backup data to the slave server, mysql> source/tmp/slave. SQL 4, the following can be connected, but before the connection, you must first view the backup file and use the
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.