Discover mysql replication status, include the articles, news, trends, analysis and practical advice about mysql replication status on alibabacloud.com
allows us to take a snapshot of the data file with a snapshot of the log file based on the same moment.A snapshot-based approach to backup and restore:First of all: we also need to do the request global lock, prohibit the user's write operation, prevent the data change.Second: After locking the table, we want to scroll the binary log in order to facilitate instant point restoreThen: Make the name and location tag of the binary log fileNext: Take a snapshotFinally: releasing the global lockWith
the strategy plus this sentence
mysql> set global validate_password_policy=0;
3. Grant permission from the library account to copy the Chaoge from the library, copy it on the 192.168.178.130 machineGrant Replication Slave on * * to ' chaoge ' @ ' 192.168.178.130 ';#检查主库创建的复制账号Select User,host from Mysql.user;#检查授权账号的权限Show grants for [email protected] ' 192.168.178.130 ';Enables read-only access to the pr
AB replication (mysql synchronization) bitsCN.com
Project Environment:All systems are cent OS 5.5Master server IP address: 192.168.19.172 (master)Slave server IP: 192.168.19.168 (slave)Both of them have set up mysql (the root user and password are empty)1: Set synchronization master and modify the mysql master configu
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
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
= 192.168.113.9 // ip address of the master database serverMaster-user = repuserMasters-password = 111111Master-port = 3306Master-connect-retry = 15Replicate-do-db = testdb // the database to be synchronized. Multiple databases can be separated by commas (,) or multiple lines can be written.Replicate-ignore-db = mysqlLog_bin =/var/log/mysql/mysql-bin.logExpire_logs_days = 10Max_binlog_size = 100 M
(3) deb
Mysql master-slave replication bitsCN.com I. environment description
Master Database server ip address: 192.168.0.2
Slave Database server ip: 192.168.0.3
Mysql on the master-slave server has been completely installed, but is put into production, so no data is generated.
II. master-slave replication configuration
1. mas
Mysql backup and AB replication are available in two ways: Synchronous replication (msylq-cluster) asynchronous replication (mysql-ms master-slave backup is also called dual-machine Hot Backup) I. Mysql full backup (
MySQL replication (2) bitsCN.com
As we can see from previous articles that binary logs play an important role in replication, this article focuses on the core component behind Mysql replication: the true nature of binary logs.Binary log structure
In terms of concept, binary
status, perform the show master status in the master's database, and view the primary server binary log statusmariadb[(none)]>showmaster status;+------------------+----------+--------------+------------------+| file|position| binlog_do_db|binlog_ignore_db|+------------------+----------+------- -------+------------------+|mys
1. MY.CNF Configuration
Modify the my.cnf file, enable binary logging, and set Server-id as unique number, do not follow slave repeat
[Mysqld]Log-bin=mysql-binServer-id=1NOTICE:For good consistency, you can set up innodb_flush_log_at_trx_commit=1 and sync_binlog=1, but there is a certain performance impact.
2. Create a dedicated account mainly from
Each connection from the server to the primary server uses the
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
recovery from library
Master-Slave replication-the principle of asynchronous replicationThe principle of semi-synchronous replication:Parallel Replication
MySQL parallel replication
New in Community edition 5.6
Parallel refers to the multi-threaded from library apply Binlog
Library level pa
MySQL replication (1) bitsCN.com
Compared with small sites, database administrators of large sites must do the following in advance:
Provides a recovery plan for core business data in the event of a disaster. Theoretically, this process must be executed at least once.
Provides optimization plans by collecting a large amount of user data and monitoring the load on each node of the website
Rapid horizonta
; // displays the status of slave.From the output result, if Slave_IO_Running and Slave_ SQL _Running are both Yes, the configuration is successful.Add multiple slave databases online:Principle: If the slave database is directly added to the master database, the mysql service will be stopped to lock the table, thus affecting the normal workflow,Therefore, online addition of slave databases can achieve datab
the backup mysql on slave -- host = slave-1
In fact, the mysqldump Command provides the master_data option to automatically dump MASTER_LOG_FILE and MASTER_LOG_POS information to backup. SQL.
In addition, flush tables with read lock is not secure for InnoDB, because although the table will be locked and no new transactions will be generated, there are still some activities in the background to continue.
Therefore, the following method can be us
MySQL built-in replication function is used to optimize Availability MySQL built-in replication function to optimize availability. in Soundbreak, we play live audio and video continuously 24 hours a day, so for MySQL's new replication feature, we cannot make convincing tests
, only need to change vim/etc/my.cnf. Configuration of Master: vim/etc/my.cnf
log-bin=mysql-bin #新增
server-id=1 #新增 after the configuration is complete, restart MySQL, and then execute the following command: master:mysql> grant replication Slave on * * to ' root ' @ '% ' identified by ' 123456 '; then perform show master
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.