http://blog.csdn.net/silentbalanceyh/article/details/5252280
(This chapter will talk about a more important chapter in Java, here to say sorry, because the reason for the recent change of work, there has been no time to continue writing tutorials,
With regard to mysql-ha, there are many solutions, such as heartbeat, DRBD, MMM, shared storage, but each has its pros and cons. Heartbeat, DRBD configuration is more complex, need to write their own script to achieve MySQL automatic switching, for
Xtrabackup Backup and restore MySQL
Xtrabackup has two main tools: Innobackupex and Xtrabackup,xtrabackup can only back up InnoDB and xtradb data tables, Innobackupex encapsulates Xtrabackup, You can back up MyISAM data tables.
The MySQL database
Environment:Master server: CentOS 5.2 mysql 5.1.35 source ip:192.168.1.22From server: CentOS 5.2 mysql 5.1.35 source ip:192.168.1.33Configuration:First, the main server1.1, create a replication user, with replication slave permissions.Mysql>grant
The most basic MMM installation must require at least 2 database servers and a monitoring server the MySQL cluster environment to be configured contains four database servers and a monitoring server, as follows:
function
IP
First, preparatory work
1, respectively in master and slave implementation of the following, convenient MHA check replication:Grant all privileges in *.* to ' root ' @ ' 10.1.1.231 ' identified by ' rootpass ';Grant all privileges in *.* to ' root '
The MySQL master copy structure differs from the master-slave replication structure. In the primary replication structure, any changes to the data inventory on either of the two servers are synchronized to another server, so that the two servers are
In order to realize the redundancy of MySQL database, backup, recovery, load balancing functions, such as the two days have been learning and research MySQL dual-machine hot standby, in fact, MySQL dual-machine hot standby is the use of MySQL
One, log type:
MySQL has several different log files that can help you find out what's going on inside Mysqld:
The type of information that the log file is logged into the fileThe error log records issues that occur when you start, run, or
Today, a few MySQL servers suddenly power outages, restart after the replication can not start, always reported the following error:
080922 10:29:01 [note] Slave SQL thread initialized, starting replication into log ' mysql-bin.000778 ' at position
Environment:
Master server: CentOS 5.2 mysql 5.1.35 source ip:192.168.1.22
From server: CentOS 5.2 mysql 5.1.35 source ip:192.168.1.33
Configuration:
First, the main server
1.1, create a replication user,
MySQL master-slave copy and read-Write separation experiment IntroductionIn the actual production environment, if the database read and write on the same database operation, whether in terms of security, high availability or high concurrency and so
Master 192.168.56.20 and new database from both DB1 DB2 DB3 (if the database is in use, need to be locked manually from the primary backup and then from recovery)mysql> CREATE DATABASE db1;Query OK, 1 row Affected (0.00 sec)Mysql> CREATE DATABASE DB2
MySQL high-availability cluster skill target
Familiar with MMM high-availability architecture
Familiarity with MHA high-availability architectures
Learn to configure MMM high availability
Learn to configure MHA high availability
8.10 Mysql Master-Slave synchronization8.10.1 Master-Slave principleThe principle of MySQL master-slave synchronization:1. Turn on the Bin-log log on master to record some records of changes deleted on master.2, the master and slave each open IO
The environment is as follows:Centos6.5_64MySQL5.6.26master1:192.168.1.112master2:192.168.1.114MySQL InstallationHere is ignored, mainly is a careful. Sometimes a careless, you will find that the installation failed.Configure Master11. Modify the My.
Failure phenomena:Enter the slave server and run:MySQL> show Slave status\g ... . Relay_log_file:localhost-Relay-bin. 000535 21795072 relay_master_log_file:localhost-bin.
MySQL Master-Slave introductionMySQL master-slave is called replication, AB replication, A and b from the back, write data on a. B will also synchronize A's data, both to achieve real-time synchronizationMySQL is based on the Binlog log to
1MySQL5.6The primary master replication environment is as follows: Centos6.4_64mysql5.6Master1:192.168.10.11Master2:192.168.10.121.1Configure Master1a. Modify the My.cnf file to add the following: Server-id=1#数据库 ID number log-bin=mysql-bin #启用二进制日志;
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.