Home >Backend Development >PHP Tutorial >MySQL Manual Version 5.0.20-MySQL Synchronization (2)_PHP Tutorial

MySQL Manual Version 5.0.20-MySQL Synchronization (2)_PHP Tutorial

WBOY
WBOYOriginal
2016-07-13 17:02:52846browse

6.4 Setting up synchronization



The following describes how to quickly set up a MySQL synchronization server. Suppose you plan to synchronize all databases and have not set them up before. The master server needs to be shut down to complete all steps.


The process described in this chapter can be used in the case of one slave or multiple slaves.




This is just the most direct way to set up a slave, not the only one. For example, if you already have a data snapshot of the master, the master has set the server ID (server_id) and enabled the binary log, there is no need to shut down the master or prevent data from being updated on the master. Please see "6.9
Replication FAQ" for details.




If you want to fully master the MySQL synchronization settings, it is best to read this entire chapter and test on "14.6.1 SQL
Statements for Controlling Master Servers" and "14.6.2 SQL Statements for
Controlling Slave Servers". And be familiar with the various synchronization setting options. Please see "6.8 Replication Startup
Options" for details.


Note that this process and some subsequent synchronous SQL statements require SUPER permissions. Before MySQL 4.0.2, it was
PROCESS permission.






Please confirm that a more recent version of MySQL is installed on both the master and slave , and the compatibility between these versions is listed in "6.5
Replication Compatibility Between MySQL
Versions". Please confirm that the problem still exists in the latest version, otherwise do not report the bug.



Add a new account on the master so that the slave can use it to connect. This account must be granted REPLICATION
SLAVE permission. If this account is only used for synchronization (recommended), then there is no need to grant additional permissions. Set your domain to mydomain.com and want to authorize an account repl using password

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/631012.htmlTechArticle6.4 Setting up synchronization The following describes how to quickly set up the MySQL synchronization server. Suppose you plan to synchronize all databases and have not set them up before. The master server needs to be shut down to complete...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn