The day-to-day collation of MySQL

Source: Internet
Author: User

Record the work of the dots:

Today I met case 1:

On the test machine, the start slave appeared "suspended animation" phenomenon, the database can be connected,

Show Processlist: Queue Waiting Master

See from the error log:

    120831 16:20:59 [ERROR]/usr/local/mysql3307/libexec/mysqld:disk is full writing './mysqld-relay-bin.~rec~ ' (Errcode: Waiting for someone to ... (Expect up to secs delay for server to continue after freeing disk spaces)
120831 16:20:59 [ERROR]/usr/local/mysql3307/libexec/mysqld:retry in secs. Message reprinted in secs   

The log shows that there is no disk space, ah, this really can not let people accept.

Clean up the disk, set global Sql_slave_skip_counter=1;start SLAVE;

This column more highlights: http://www.bianceng.cn/database/MySQL/

(The value of the variable becomes sql_slave_skip_counter when the thread is copied)

Case 2:

Today, someone asked me a question, in the master-slave copy mode, Master uses Innodb,slave MyISAM (this can be achieved, because in the binlog inside is not to pass engine=?), when the program is enabled, if the rollback, Then the use of MyISAM engine slave will not cause and master data inconsistencies.

First of all, this does not result in inconsistent data.

Second: Because MyISAM does not support transactions, performing START/COMMIT operations on tables that do not support transactions has no effect, commits before committing a commit, and does not report an error.

Finally, if the rollback statement occurs inside the Binlog, the transaction performs the reverse operation, clearing the data inside the library, binlog the DML statement that responds is cleared, and there is no record of the rollback statement. The data on all master and slave is consistent.

Case 3:

Create a datasheet from another datasheet or query result

Create TABLE ... the LIKE statement creates a table that is exactly the same as the original table, and the column's property page is persisted. However, this statement cannot be created using only one column of its central table

Create TABLE ... select creates a new datasheet based on the query structure of the SELECT statement, and by default does not copy the properties of the original column. But you can create a table based on a column in the original table

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.