MySQL Database Server tuning

Source: Internet
Author: User

The day before yesterday to customers to do a database server adjustment, the previous one host abandoned, one from the library to promote the main, and then new to join other slave, here to record the operation steps:

First, the old master library is turned on for read-only so that later steps are rolled back: Flush tables with read lock

Second, 110.10.1.102 upgrade to the main library, pause synchronization, reset to primary, clean up the relay information, restart the database

stop slave, reset master, MV Master.info relay.log/tmp

Modify the configuration file my.cnf join expire_logs_days=15 and innodb_file_per_table

Third, open the new main library read-only: Flush tables with read lock

Export logical Backup: Mysqldump-u root-p--single-transaction-r--flush-logs--master-data=1-databases db1 DB2 db3> database1204. Sql

Iv. Show Master status, import data to a new library and change master

V. Finally view all status information from the library, show slave status, and unlock the tables of the main library

As a reminder, the mysql5.5 version no longer supports parameters such as Masterhost in/ETC/MY.CNF and must be connected to MySQL to perform change master

MySQL Database Server tuning

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.