MySQL Master-slave processing

Source: Internet
Author: User

1. Database Startup:

Service mysqld start;

******.pid failed Data folder does not have write permission chmod–r 755 Data

/usr/local/mysql-proxy/bin/mysql-proxy--DEFAULTS-FILE=/USR/LOCAL/MYSQL-PROXY/CONF/ONLINE.CNF &

or: cd/usr/local/mysql-proxy/bin/

./mysql-proxyd Online Start

MySQL Agent Pool Boot

Database latency:

show slave status;

Slave_io_running:yes
Slave_sql_running:no

Stop slave;

Set global sql_slave_skip_counter = 1;

Start slave;

show slave status;

If:

Slave_io_running:no
Slave_sql_running:yes

Locate the Master_host corresponding IP Host, log on to the host

(mysql>) Show master status;

+------------------+----------+--------------+---------------------------------------------+------------------- +

| File | Position | binlog_do_db | binlog_ignore_db | Executed_gtid_set |

+------------------+----------+--------------+---------------------------------------------+------------------- +

|mysql-bin.000031|20345138| |      Mysql,performance_schema,information_schema | |

+------------------+----------+--------------+---------------------------------------------+------------------- +

(131) MySQL > Stop slave;

(131) MySQL > Stop slave;

(131) MySQL > Change master to master_log_file= ' mysql-bin.000031 ', master_log_pos=20345138;

(131) MySQL > Start slave;

Show master status;

View MySQL Maximum number of connections: Show variables like ' max_connections ';

View current MySQL The connection status: show full processlist;

To set the MySQL variable temporarily:

Set global max_connections = 3000; Fail after reboot

Vim/etc/my.cnf

MySQL Master-slave processing

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.