Tags: linux mysql master-slave replicationPrerequisites:MySQL in the master and slave operation of the installation and basic configuration of MySQL please refer to my other post: Linux under the installation of MySQL and multi-instance operation " http://ylcodes01.blog.51cto.com/5607366/1841686 "First, the main library operation1, 1 view the main library system
Label:Package Download Http://url.cn/WrNg5SMain database:192.168.161.129From the database 1:192.168.161.130From the database 1:192.168.161.138MySQL Installation address:/usr/local/mysqlMySQL Data Catalog:/usr/local/mysql/dataPrimary MySQL binary log (binlog) file:/usr/local/mysql/mysql-binlogRelay log files from MySQL:/usr/local/mysql/mysql-relay-binlog1. Create a copy account:Mysql>grant Replication Salve on * * to 'rep' @ ' 192.168.161.% ' identifie
Last week in the production environment encountered a problem, do not dare to enjoy, take out to the small partners to do a simple share.
Cause: Due to the IDC room power failure (it is estimated where the excavator touched the next bar), causing all the server restart, affecting the MySQL database. Look at this time the database encountered problems:
Database version: MySQL 5.7.10
Problem performance
: Copy the following error from machine:Slave SQL for channel ”: Slave failed to initialize
:0Sql_remaining_delay:nullSlave_sql_running_state:slave have read all relay log; Waiting for more updatesmaster_retry_count:86400Master_bind:Last_io_error_timestamp:Last_sql_error_timestamp:MASTER_SSL_CRL:Master_ssl_crlpath:Retrieved_gtid_set:Executed_gtid_set:auto_position:0replicate_rewrite_db:Channel_name:1 row in Set (0.00 sec)ERROR:No query specifiedmysql> show databases;+--------------------+| Database |+--------------------+| Information_schema || MySQL || Performance_schema || SYS || Tes
Tags: demonstrate the process of building a multi-master from MySQL 5.7Here's a demonstration of the process of building a multi-master from MySQL 5.7:Lab Environment:master_1:192.168.10.128master_2:192.168.10.129slave_3:192.168.10.130First, the database that needs to be synchronized is exported on master_1 and master_
continues copyingFor other parameters, see http://www.tbqu.com/post/15.html
There are some differences between multi-master-slave mutual backup and master-slave replication. Because multiple master nodes can have write permissions on the serverSelf-growth repetition
Problem
Recently, the team has a Data Synchronization requirement. Generally, two or more database (MariaDB) servers use the VPN channel to synchronize data with one database. First, they do not care about the VPN channel communication problem, this kind of multi-master and One-Slave Data Synchronization requirement has also been achieved through the replication function
, can choose strong consistency model.
principle Brief:
Redis Master-slave replication can be divided into full-volume synchronization and incremental synchronization based on whether it is full.
Full-Volume synchronization:
Redis full replication typically occurs during the slave initialization phase, when slave needs to copy all the data on
Tags: mysql master-slave synchronizationThis article mainly introduces the single server MySQL database multiple instances of the master-slave synchronization, general general master from the replication slave server on different machines, and listening ports are the default 3306 port.I. Introduction to the Environment
Tags: require user msi to include master-slave replication Delete data sync ant ATIWindows creates multiple instances of MySQLInstalling MySQL and instance 1
Run Mysql-installer-community-5.7.16.0.msi
Select components
MySQL Server 5.7.16–x64
MySQL Utilities 1.6.4–x64
MySQL Workbench 6.3.7–x64
Performing the installation
Configuring Port 3306
Windows Se
installation of the login will encounter this problem ...) ) Here is a summary of the multi-instance startup, shutdown, and login instructions:Start command: Mysqld_safe--defaults-file=/data/3306/my.cnf 2>1 >/dev/null Shutdown instruction: Mysqladmin-s/data/3306/mysql.sock shutdown (with password to specify-u,-P option)Login command: Mysql-uroot-p-s/data/3306/mysql.sockSpecify instance logon skip permission table:Skip permissions: Mysqld_safe--defaul
New MySQL builds multi-threaded master-slave replication
One: First get
Mysql-5.7.11-1.el6.x86_64.rpm-bundle.tar
Tar XF Mysql-5.7.11-1.el6.x86_64.rpm-bundle.tar
Yum install-y mysql-community-client-5.7.11-1.el6.x86_64.rpm mysql-community-common-5.7.11-1.el6.x86_64.rpm mysql-community-libs-5.7.11-1.el6.x86_64.rpm mysql-community-libs-compat-5.7.11-1.el6.x86_64.r
Environment192.168.126.129 Node29 Master Master192.168.126.130 Node30 slave-1 from 1192.168.126.131 Node31 slave-2 from 2The following 1-4 steps need to be done on all three servers1. Upload MARIADB Package2. Unpack the RPM packageTAR-ZXVF mariadb-10.0.30_centos-6_rpm.tar.gz3. InstallationYum Localinstall-y *.rpm4. Turn off the firewall, SELinux/etc/init.d/iptables stopChkconfig iptables onSetenforce 0Sed-i ' s/^selinux=.*$/selinux=disabled/'/etc/seli
不写主的IP写主的域名也可以Sed-i "217a masterauth wsyht"/usr/local/redis/6380/conf/redis.conf #master没密码可以不做这一步Redis-cli-p 6380 shutdownRedis-server/usr/local/redis/6380/conf/redis.conf 2) Build Library verification view, main operation[Email protected] conf]# redis-cli-p 6379-a wsyht127.0.0.1:6379> Set name WsyhtOk127.0.0.1:6379> Get Name"Wsyht"127.0.0.1:6379> Select 1Ok127.0.0.1:6379[1]> Set name PeterOk127.0.0.1:6379[1]>info #查看所有信息包括同步127.0.0.1:6380>info
, both of which are reasonable, but the two sides are not unified, resulting in replication error, MySQL from 5.1 to the current MySQL5.5 version of the problem (MySQL5.6 has not been tested, there should be the problem). Workaround:
Service side use UTF8 character set encoding (due to the previous GBK, change to UTF8 will appear garbled and so many problems)
Change application does not insert int field for non-int data
Change app doe
Tags: style blog http using io strong file dataMySQL Multi-byte character set causes master-slave data inconsistency problemFrom cirrious 2013-04-27 16:03:56| Category: Default Categories | Report | Font size Subscription Reprint: http://backend.blog.163.com/blog/static/20229412620133274030845/ problem arisesThere has been a legacy problem on the line, and recently the DBA has raised it, so followed
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.