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
/local/mysql \--datadir=/home/mysql
14. Establishing a soft connectionln -s /var/lib/mysql/mysql.sock /home/mysql/mysql.sock15. Configure the MySQL installation path and the data directory path in the MYSQLDvi /etc/init.d/mysqld
Basedir=/usr/local/mysqlDatadir
MySQL master-slave replication configuration-windows single-host environment bitsCN. in the comwindows8.1 system, configure mysql master-slave replication. test Environment Overview win8os, 64-bit OS, memory, download mysql5.6.16-winx64.zip package on the local disk decompress two
MySQL master-slave replication is widely used in database backup, failover, data analysis and other occasions.MySQL master-slave replication keeps track of all changes to the database (update, delete, and so on) in the binary log based on the master server. Therefore, to replicate, you must enable binary logging on the primary server. Receive updates from the ser
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
First, let's look at the problems that the database often encounters:The first is the performance problem.1, upward expansion (hardware) scale up the individual itself easily reached the limit2, outward expansion scale outThe second is the question of usability.1. Database service Interruption2. damage to the wrong operation data3. Hardware Failure4. Database Upgrade test encountered bug5. Hacker attacksBased on the above problems, there is a better solution, that is, to implement the master-sla
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
path to the SQL file)mysql>source/data/all.sql;Method Two:#mysql-uroot-p 6. Configure the replication parameters, slave the configuration of the Master Master library from the library connectionMySQL > Change master to master_host= ' 192.168.178.129 ',Master_user= ' Chaoge ',Master_password= ' Redhat ',Master_log_file= ' my
deployment for semi-synchronous replicationTo use semi-synchronous replication, the following conditions must be met:1. MySQL version 5.5 and above2. Variable have_dynamic_loading is yes3. Asynchronous replication already existsLoad plug-ins firstBecause the user needs to execute install PLUGIN, SET GLOBAL, STOP slave and st
System version: CentOS 6.5 mysql version: mysql-5.5.38Production environment, if the same database server to do write service and read services, whether from security, high availability or high concurrency and other angles can not meet the actual demand, therefore, the general use of multiple database servers through master-slave replication to synchronize data t
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 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
Tags: completing the Generate Plugins Status tool parameters MySQL database size1 OverviewSemi-synchronous replication refers to a subset of host synchronous replication, and another part of the host asynchronous replicationThe logic of synchronization is that the user writes to the primary server, the primary service is logged to the binary file, the primary ser
MySQL replication can ensure the redundancy of the data and read and write separation to share the system pressure, if the primary master replication can also be good to avoid the primary node single point of failure. But there are some problems with MySQL master replication
, as shown below:
Start slave;
The master-slave synchronous replication of mysql is enabled. Run the following command to check whether the synchronization is normal. As follows:
Show slave status \ G;
Check whether the synchronization is mainly to check the Slave_IO_Running and Slave_ SQL _Running options. If synchronization is normal, the two options must be
use a binary log and set a unique ID number.On each slave server, you must set a unique ID number in order to connect to the Maste server(optional) Create an independent user to authenticate the primary server and replicate by accessing the binary logBefore you create a data snapshot or start the replication process, you need to log the master server's binary log location. This information is required at l
= 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
may be manually restored or modified before the copy is restarted. at this time, when DBA replays the log file, you can find the event to know where to start or stop replay.
Incident: This event type was introduced in MySQL 5.1. Compared with the Stop event, this event contains a identifier to specify which type of accident occurred. It is generally used to indicate that the server is forced to execute a
First, the preparation (master and slave need to configure):Yum-y install MySQL mysql-server#安装mysqlYum-y Install ntpdate#安装时间同步Echo ' */1 * * * * */usr/sbin/ntpdate ntp1.aliyun.com >/dev/null '>>/var/spool/cron/root #配置网络时间同步Service mysqld start#启动服务Chkconfig--add mysqld#添加为系统服务Chkconfig mysqld on#开启默认运行级别Second, the primary server configuration: The main config
MySQL replication can ensure the redundancy of the data and read and write separation to share the system pressure, if the primary master replication can also be good to avoid the primary node single point of failure. But there are some problems with MySQL master replication
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.