MySQL Master a few small points of knowledge

Source: Internet
Author: User

One, causes the database to stop:

A, mysqld often end abnormally

b, the disk space is full

C, disk failure

D, Server power failure

Second, MySQL master-slave synchronization features and considerations:

A, master (master) refers to a server that receives a client-issued statement that modifies and queries two types of statements

b, from (Slave) refers to do not receive update requests issued by the client, only through the linkage with master to make the data update server

Synchronization data synchronization, asynchronous data synchronization:

A, in order to achieve synchronization, the slave set up two processes simultaneously, namely "I/O process" and "SQL Process";

b, the I/O process is responsible for the data obtained from master (update log) in the trunk log file to record;

c, the SQL thread reads the trunk log and executes the query

Iv. Why do I need two threads?

The main purpose is to reduce the delay of synchronization, if only one thread is assigned, and SQL processing takes time, it is not possible to copy data from master during the processing of SQL statements

Five or two binary log and relay log

A, "binary log" will be generated in master, and a relay log will be generated in slave

b, binary log only the statements that modify the data, not the query class (not the database modification) statement, binary in addition to be used for synchronization, but also used to save the updated statements in the backup

c, binary is not text format, can not directly open the view, you need to use Mysqlbinlog at the command line to convert it to text format

D, the trunk log means that the slave I/O thread is saved on slave after it obtains the update log from Master, which records the data requested by the modified class statement.

E, the trunk log content is the same as the binary log, unlike the binary log, when not needed, the trunk log will be automatically deleted by the SQL thread, do not need to manually delete


This article is from the "Frozen vs watermelon" blog, so be sure to keep this source http://molewan.blog.51cto.com/287340/1940153

MySQL Master a few small points of knowledge

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.