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