Percona-toolkit tutorial tools
1. pt-archiver
Function introduction:
Archive the records of tables in the mysql database to another table or file
Usage:
Pt-archiver [OPTION...] -- source DSN -- where WHERE
This tool only archives old data and does
1. Overview of Replication
1.1 problems solved by ReplicationData replication technology has the following features:(1) Data Distribution(2) load balancing)(3) backup(4) high availability and fault tolerance
1.2 How replication worksFrom a
Recently there is a business needs, multiple machines need to query data from a MySQL table at the same time and do follow-up business logic, in order to prevent more than one machine to get the same data, each machine needs to be in the acquisition
Simulate a scene:
To build a InnoDB engine table:
CREATE TABLE Shuzhi
(
ID Mediumint (8) Primary key,
Name varchar (30),
Shuzhi Mediumint (10)
);
ALTER TABLE Shuzhi ENGINE=INNODB;
Insert Some records:
INSERT into Shuzhi values (1, ' AA ',
How do I get into the MySQL command line? MySQL's installation directory has a bin directory, first use the command line to enter the directory, and then log in with mysql-uroot-p123456 (Note: username and password do not include "")
Command: Show
Mysql
6.9 Sync FAQ
Q: Master is still running, how can I configure slave without stopping it?
A: You need to design several option parameters. If you have a backup of MASTER and record the data snapshot binary log file name and the offset location
1. Master Vault Master OutageSign in from library show Processlist\gSee update status for two threadsmysql> show processlist\G*************************** 1. row *************************** Id: 1 User: system user Host: db: NULLCommand: Connect
LockMyISAM only supports table lockscreatetable crm_member; ##查看引擎altertable crm_member engine = MyISAM; ##更改表引擎Read Lock DemoSession 1 Read lock Other session can be read and not writablelock table crm_member read;Session 1 Lock Wait time
Originally the MySQL binlog and show processlist commands belonged to the two transactions of unrelated, but in the most recent troubleshooting, there was a significant replication delay found in the main library and from the library, but the
Summary: Masterha_master_switch is integrated as a switch tool in the MHA package,Install: After compiling and installing MHA Manager, binary executable program Masterha_master_switch will be generated in/usr/local/bin/.Use:$masterha_master_switch --
Tag:nec root rac cond Run function gone process unit When MySQL consumes too much CPU, what should I do to optimize it?High CPU consumption, can be considered as follows:1) Generally, to eliminate the high concurrency
http://blog.csdn.net/starnight_cbj/article/details/4492555command: show Processlist;if it is the root account, you can see the current connection for all users. If you are a normal account, you can only see the connection you are occupying. show
Today, my MySQL met a mistake that wasn't so strange "Too Many connections" . Normally encountered this problem, I basically modify /etc/my.cnf 'smax_connections parameter, and then restart the database. ButThe database on the production server is
1.1MySQL master-Slave delay Replication IntroductionFrom MySQL5.6 to support the master-slave delay replication, the main problem is that when the main library has a logical data deletion or error updates, all the library will be the wrong update,
1 Event BriefThe event is a procedural database object that MySQL invokes at the appropriate time. An event can be invoked once or periodically, and it is managed by a particular thread, the so-called "event Scheduler".Events are similar to triggers,
1. View the maximum number of connectionsShow variables like '%max_connections% ';2. Modify the maximum number of connectionsSet GLOBAL max_connections = 200;The following article is mainly to introduce you to the MySQL maximum connection number of
When MySQL consumes too much CPU, what should I do to optimize it?High CPU consumption, can be considered as follows:1) Generally, to eliminate the high concurrency factor, or to find out what causes your CPU is too high in the execution of the
MySQL master-slave Switch manualMaster-slave ArchitectureOperation and Maintenance DepartmentV1.0 . Year May 24Normal switching
Check slave synchronization Status
1) in master execution: show Processlist;Show Master have sent all
In a MySQL replication environment, we usually only judge the latency of the slave based on the value of the seconds_behind_master . This is acceptable in most cases, but is not accurate enough and should be considered for more factors.First, let's
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.