SQL _Error_Timestamp:Master_SSL_Crl:Master_SSL_Crlpath:Retrieved_Gtid_Set:Executed_Gtid_Set:Auto_Position: 01 row in set (0.00 sec)
If both Slave_IO_Running and Slave_ SQL _Running are yes, the master-slave replication configuration is successful.Next, you can test whether the configuration is successful. First, create a new table in the test database of the pri
Tags: start conflict shel logic based on how run Inno is implemented1 Replication Overview 1.1 Replication-Resolved issues Data replication technology has some of the following features: (1) Data distribution (2) Load balancing (load Balancing) (3) Backup (4) High availability (Hi availability) and fault tolerance 1.2 How rep
only need to change 192.168.0.4% mysql> Update user Set host = '% ' where user = ' root ';MySQL Master-slave replicationOn the Windows MySQL do master,linux on MySQL do slave,mysql version is 5.7.18;windows IP for 192.168.0.4,linux IP for 192.168.0.223 1. Open Binlog Log on
Tags: group replication"MySQL Group Replication"The group replication is an open source plugin developed by MySQL and is a tool for implementing MySQL's highly available clusters. The first GA version is officially released in MySQL5.7.17; To use group
are three ideas.
In/etc/my. inf on the master, set the database to be synchronized using the binlog-do-db and binlog-ignore-db parameters.
Restrict the database
Restrict the database to replicate-do-db = dbname on slave
4) Enable slave
5) check whether the Slave communicates with Mater. If both Slave_IO_Running and Slave_ SQL _Running are yes, the configuration is successful.
Test
Create a database on the Master node
Slave check that the data
can have multiple machine
1, first login host A
The code is as follows
Copy Code
Mysql>grant REPLICATION SLAVE on *.* to ' backup ' @ ' 192.168.1.101 ' identified by ' 123456 ';
Given the permissions from the machine, there are more than one cluster machine, on the execution of multiple
2, open the my.cnf of host A, input
The code is as follows
Cop
request, the result is returned to the user. And store the information in the memory, and then record it into the binary file, this will cause the slave server to lag behind the master server, but this is also good, if you have an error operation, in this time, it is OK to back up data from the server immediately, which requires the mysql administrator to grasp.
II. Implementation of mysql master-slave
= zbdba must be enabled.
5. Slave initialization and replication
mysql>slave stop; mysql>CHANGE MASTER TO MASTER_HOST='192.168.56.12',MASTER_USER='zbdba',MASTER_PASSWORD='123456',MASTER_LOG_FILE='ogg1-bin.000003',MASTER_LOG_POS=107;mysql> show slave status\G;*************************** 1. row **********************
.
mysql> show grants for 'replication'@'%';+--------------------------------------------------------------------------------------------------------------------------------------+| Grants for replication@% |+-------------------------------------------------
change minimizes performance loss because it reduces the number of table scans required to update all rows (slave_rows_search_algorithms parameter TABLE_SCAN by default, INDEX_SCAN, HASH_SCAN ).
The transaction-write-set-extraction parameter is enabled by default: write set extraction is used to start group replication for the user or trace the master on the master server using WRITESET-based dependency.
Enable Binary log expiration time by default
Windows.However, sometimes the compile time can pass, but the runtime prompts such errors: "X error of failed reques:badwindows (invalid Windows parameter)"By its meaning, the Windows parameter of OpenGL in the program is set incorrectly, not actually. This problem is usually due to system updates, such as running the sudo apt-get Upgrade command, and so on, updating the X service in the system to overwrite some files of the previously installed Nvidia graphics card, and re-install the Nvidia g
Background Introduction mysql5.5 previous version, MySQL master-slave replication is relatively simple Mysql5.6:gtid,multi-thread replicationMaster1 Enable binary Log log-bin = Master-binlog-bin-index = Master-bin.index2 Select a unique server IDServer-id = [0~2^32]3 Create a user with replication permissionsreplication Slave, copied from the nodereplication clie
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
;1.1.6 Viewing binary logsView MySQL Data Catalog, yum mode installation data directory for/var/lib/mysql[Email protected] ~]# Ls/var/lib/mysqlMysql> Show Binlog Events\gEnsure that the synchronized database is consistent prior to replication[Email protected] ~]# mysqldump-uroot-pyourpasswd HA >ha.sql #可以导出数据库To pass the exported database to the slave server, met
--DEFAULTS-FILE=/HOME/MYSQL/MYSQL/CONF/MASTER.CNF
Java code
# Slave
# If Mysql is started, turn it off first.
/home/mysql/mysql/bin/mysqladmin-u root-p shutdown
# start MySQL with the modi
Rotten mud: Learn the principle of mysql database master-slave synchronous replication, mysql master-slave
This article was sponsored by Xiuyi linfeng and first launched in the dark world.
This article is partly reproduced on the Internet.
MySQL Replication is a master-sla
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.