mysql5.6 主从复制同步详细配置(图文)_MySQL
环境:Centos 6.5
mysql5.6
采用的是虚拟机环境
master ip:192.168.17.140
slaver ip:192.168.17.141
下面开始配置:
master的配置:
1.注意下图的箭头:
2:重新启动mysql服务
shell: service mysqld restart
3.看下图:
命令如下:
mysql -u root -p
grant replication slave,replication client on *.* to 'root'@'192.168.17.141'
identified by 'happy123';
show master status \G
-------------------------------华丽的分割线--------------------------
slaver配置:
看下图:
2.重新启动服务器,进入客户端,执行下面的命令:
只要注意下面的log与上面master查看的要保持一致
3.查看slave情况
show slave status \G;
出现下面的情况是因为我的slave是克隆的,所以在mysql的数据目录下的auto.cnf文件中的uuid一样
然后我们可以这样:
再次start slave ,会出现以下的页面:表明配置成功:
本人自己进行了测试,是可以实现的。
最后总结:出现错误要看上面的日志,很清楚就可以发现是什么问题了。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



With the rapid development of the Internet, Web applications are increasingly integrating database operations. MySQL is a world-renowned relational database system that is widely used. In highly concurrent web applications, MySQL master-slave replication is an important way to improve database performance and availability. This article will introduce how to use PHP to implement master-slave replication of MySQL database. 1. What is MySQL master-slave replication? MySQL master-slave replication refers to copying data from one MySQL database server to another server.

Building a Highly Available MySQL Cluster: Best Practice Guide for Master-Slave Replication and Load Balancing In recent years, with the rapid development of the Internet, the database has become one of the core data storage and processing engines for most web applications. In this scenario, high availability and load balancing have become important considerations in database architecture design. As one of the most popular open source relational databases, MySQL's cluster deployment solution has attracted much attention. This article will introduce how to implement a highly available database cluster through MySQL master-slave replication and load balancing.

MySQL database is a very popular relational database management system that supports a variety of data replication technologies, among which the more commonly used is master-slave replication technology. This article will introduce the data master-slave replication technology in MySQL, including principles, implementation methods, common problems and countermeasures. 1. Principle of master-slave replication technology The master-slave replication technology in MySQL can copy the data of a MySQL database to other servers to achieve data backup, load balancing, read-write separation and other functions. Its basic principle is to convert the main database

Redis is an open source memory-based key-value storage system that is commonly used in scenarios such as caching, queuing, and real-time data processing. In large-scale applications, in order to improve the availability and performance of Redis, it is often necessary to adopt a distributed architecture, in which master-slave replication is a commonly used mechanism. This article will introduce the master-slave replication function of Redis, including definition, principle, configuration and application scenarios. 1. Definition of Redis master-slave replication refers to automatically synchronizing the data of one Redis node (i.e. master node) to other nodes (i.e. slave node).

How to configure master-slave replication of MySQL database? Master-slave replication of MySQL database is a common data backup and high availability solution. By configuring master-slave replication, you can synchronize data from one MySQL server (master server) to another (slave server), thereby improving database availability and performance. The following describes how to configure master-slave replication in a MySQL database and provides corresponding code examples. Make sure the MySQL server is installed and started. First, make sure MySQL is installed on your system.

Load balancing and disaster recovery in cluster mode: in-depth analysis and practice of MySQL master-slave replication. With the rapid development of the Internet industry, the demand for data storage and processing is getting higher and higher. In response to high concurrent access and massive data storage, cluster mode has become a common solution. Load balancing and disaster recovery are important components of the cluster system, and MySQL master-slave replication is a widely used method. This article will delve into load balancing and disaster recovery in cluster mode, focusing on the principle of MySQL master-slave replication.

Realizing data redundancy and expansion: Application cases of MySQL master-slave replication technology in cluster environments Introduction: With the development of the Internet, the increasing amount of data and the increasing number of users, traditional stand-alone databases can no longer meet the requirements of high concurrency and high availability. need. In this context, distributed databases have become one of the popular solutions. As one of the most commonly used relational databases, MySQL's master-slave replication technology has also received widespread attention in distributed databases. This article will introduce MySQL master-slave replication technology in a cluster environment

Memcached is an open source, high-performance distributed memory object caching system that can be used to speed up web applications and performs particularly well in large-scale data caching. For this system, master-slave replication is a very important function, which can be used to ensure data reliability and high availability. This article will introduce how to use PHP to implement master-slave replication of Memcached database. Introduction to the master-slave mode The master-slave mode is a distributed structure of the Memcached server. It consists of at least two servers: one
