1 Select two servers, respectively, as a master and standby database2 Login to the server,Yum install MySQL;Yum install mysql-server;3 Starting the serverService mysqld Start4 separate root login MySQL to execute the following command, increase the replication user and authorization (
Installation Environment
CentOS 5.4
MySQL 5.1.xx with rpm direct installation
Xtrabackup 1.2.22 with RPM direct installation
1. Master:/etc/my.cnf
[Mysqld] Server-id = 1 Log-bin innodb_flush_log_at_trx_commit=1 sync_binlog=1 datadir=/var/lib/mysql Character-set-server=utf8 init_connect= ' Set NAMES UTF8 ' Set the default character set to UTF8, you can choose th
.png " alt= "Wkiol1vartur2iezaalcbilsdlw740.jpg"/>See the above information, congratulations, Master-slave has been built successfully.9. TestingCreate a database in mastermysql> CREATE DATABASE Leedb;Viewing the database in slavemysql> show databases;You can see that the leedb in master has been automatically synced to slave
, Changemaster immediately run. We want Changemaster, controlled by us by hand.4, the above data into the standby libraryMysql-uroot-p-E--max_allowed_packet=1048576--net_buffer_length=16384 5.See where the sync should startGrep-i "Change Master" testdb.sqlmaster_log_file= ' mysql-bin.000004 ', master_log_pos=106 here explains, I am the end of this data export winner Apartments log is
MySQL master-slave replication principle and architecture, mysql master-slave architecture1 copy Overview
The built-in replication function of Mysql is the basis for building large and
MySQL Master-Slave introductionConfigure the Primary
MySQL after installation modify the MY.CNF configuration file, modify the MY.CNF, add server-id=130 and Log_bin=dashuo1
[[emailprotected] ~]# vim /etc/my.cnf
After modifying the configuration file, start or restart the Mysqld service
[[ema
thinkphp Connection database and master-slave database setup tutorial, thinkphp master-Slave
This paper describes in detail the thinkphp connection database and the master-slave databa
Tags: two kinds of sharing pictures according to host data image inf copy mysqldump1. mysql Master-slave configuration MySQL master-slave is also called replication, AB replication. Simply speaking, A and b two machines from the b
MySQL Master-Slave introductionMySQL master-slave is also called replication, AB replication. Simply said that A and b two machines from the back, on a to write the data, the other B will follow the writing data, the two data in real-time synchronization.
Mysql5.6 + Master/Slave settings (there are some gaps between the Master/Slave settings after mysql5.5 and those before 5.5, follow these steps to first enable the database port firewalls between the master and slave
Tags: des http ar io os using SP for strongHttp://heylinux.com/archives/1004.htmlAs the most widely used free database in the world, MySQL believes that all engineers engaged in system operations must have contacted. However, in the actual production environment, the single MySQL as a separate database is completely unable to meet the actual needs, whether in security, high availability and high concurrency
data from the slave node. In horizontally Scalable businesses, replication is easy to implement, mainly in the use of the master node for write operations, multiple slave nodes for read operations, in mysql5.5, the default is asynchronous replication.
The Asynchronization of mysql replication means that a transaction
Objective: the master database is down and upgraded from the master database to the master database.Prepare the environment:1 web Server3 MySQL serversEnvironment description:1. The bbs website service is running on the web, and the database service is provided by the MySQL-
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.