-visual-explain-c MYSQL-E "explain select * from Mysql.user" | Pt-visual-explainFor example:# mysql-uroot-proot-e ' Explain select * from B2b.ecs_goods ' > A.sql # pt-visual-explain/root/a.sqlOr one-step process through the pipeline:# mysql-uroot-proot-e ' Explain select * from B2b.ecs_goods ' |pt-visual-explainPt-config-diffDescriptionCompare the differences between MySQL node configuration files.Pt-config-diff diffs MySQL configuration files and server variables. CONFIG canbe a filename or a D
server IP user name password, you can analyze the entire master-slave architecture of each server information, including but not limited to MySQL version, IP address, server Id,mysql service startup time, role (main/from), Slave Status (lag behind the master server for how many seconds, there is no error, Slave is not running). Pt-Slave-Find--host=localhost--user=rhce6--password=rhce6MySQL Deadlock monitoring pt-Deadlock-Logger h='127.0.0.1' --User=root--password=123456PRIMARY key conflict Chec
Pt-kill is a very simple tool to kill MySQL threads and queries. The main purpose is to prevent some long queries from consuming system resources for long periods of time, while affecting the online business.
Main function:
Get the connection that satisfies the condition from show processlist or read the connection that satisfies the condition from the file containing show processlist and print or kill or perform other actions.Our main use here is to prevent some select operations from being t
data conflict, then the way is to take the inconsistent node kicked out of the cluster environment.Limitations of 4.PXC
Only the InnoDB engine is supported. Because an XA transaction is likely to occur when a commit occurs rollback
XA transactions are not supported,
A table delete operation without a primary key is not supported, and a SELECT ... limit also returns a different value.
Because of optimistic concurrency control, transaction conflicts, failed nodes are exited f
--ssl-cert PATH X509 cert in PEM format--ssl-key PATH X509 key in PEM format--ssl-cipher TEXT SSL cipher to use--ssl-verify-server-cert Verify server ' s "Common Name" in its certagainst hostname used when connecting. Thisoption is disabled by default-V,--version version of MYCLI.-D,--database TEXT database to use.-R,--prompt TEXT prompt format (Default: "\ t \[email protected]\h:\d>")-L,--logfile FILENAME Log every query and its results to a file.--defaults-group-suffix TEXT Read Config group w
Tags: get install nbsp span back ini serve not tinthe existing environment already has Zabbix server and agent side installed1 Download percona Monitor pluginhttps://www.percona.com/downloads/percona-monitoring-plugins/LATEST/after download the name is as follows percona-zabbix-templates-1.1.8-1.noarch.rpm2 upload the plugin to the serverRz3 Installing pluginsRPM
1. tpcc test results
Click to view the chart
2. Test Environment
3. Key configuration options of InnoDB
Note:1. ring replication: it refers to the creation of ring replication on three nodes, each of which is master/slave. During the test, we also tried to simulate master downtime, and slave switched the master randomly to verify the data reliability in GTID mode. In the test mode, the data reliability was indeed guaranteed.2. bp8_facts: Set innodb_buffer_pool_instances = 8 and metadata_locks_
Percona MySQL5.6 semi-synchronous Replication
Configure normal clone first
Two servers, one master and one slave
Master Server:
10.10.1.30
Slave:
10.10.1.200
Modify the my. cnf file of each machine and the server_id
Master server server_id = 1, slave server_id = 2
Restart the two servers and run the following command:
Show variables like 'server _ id ';
The server_id of the two servers is different.
Log on to the Master and enter:
Grant replication sl
protected] ' 172.16.52.% ' identified by ' 123456 ';Flush privileges;in order to ensure subsequent rapid switching, the same user Authorization for replication on DB:GRANT REPLICATION SLAVE on * * to ' repl ' @ ' 172.16.52.% ' identified by ' 654321 ';Flush privileges;(v) TestingSshConnectionMasterha_check_ssh--conf=/etc/masterha/app1.cnf(vi) test master-Slave synchronizationMasterha_check_repl--conf=/etc/masterha/app1.cnf(vii) Start/Stop management node processStart the Management node process
Percona-toolkit usage tutorial-configuration tools 1. pt-config-diff
L function introduction:
Compare mysql configuration files and server parameters
L usage:
Pt-config-diff [OPTION...] CONFIG [CONFIG...]
CONFIG can be a file or a data source name. at least two configuration file sources must be specified, just like the diff command under unix. if the configuration is exactly the same, nothing will be output.
L example:
Example 1: view the difference
One: Uninstall the old versionUse the following command to check if MySQL Server is installedRpm-qa | grep MySQLSome words are unloaded by the following commandRPM-E MySQL//normal delete mode rpm-e--nodeps MySQL//brute force Delete mode, if you use the above command to delete, prompted to have other dependent files, then use this command can be strongly deletedTwo: Install MySQL install the package required for compiling codeYum-y install make gcc-c++ cmake bison-devel ncurses-develDownload
After using Percona xtrabackup to do a full standby and two incremental backups, part of a table's data has been mistakenly deleted, how to recover mistakenly deleted data.
Thinking: will be fully prepared and incremental backup, the latest backup generated binary log all copied to the test environment, in the test environment after the deleted data recovery, will mistakenly delete data generation INSERT statement, on the original machine execution.
"Mysql_password= ""
Mysql_cmdline= "/usr/local/mysql/bin/mysql
B. Run/usr/local/mysql/bin/clustercheck 200 indicates Clustercheck validation succeeded
2.XINETD Configuration
A.yum install-y xinetd.x86_64
b.cp/usr/local/mysql/xinetd.d/mysqlchk/etc/xinetd.d/
D.vim/etc/xinetd.d/mysqlchk changes the server to/usr/local/mysql/bin/clustercheck (server=/usr/local/mysql/bin/ Clustercheck)
E. Change of authority chmod +x Mysqlchk
F.vim/etc/services the last New line Mysqlchk 9200/tcp # Mysqlchk
G.service
Percona mysql5.7 centos/red hat-rpm package does not display a password during installation. It is in the error log. The automatically generated my.cnf contains this line of Log-error=/var/log/mysqld.log.So, here's our password:[Email protected] lyh]# cat/var/log/mysqld.log | grep "Temporary password"2017-06-26t04:28:05.537965z 1 [Note] A temporary password is generated for [email protected]:Ca!wb/i+l7elAttention! Special symbols need to be escaped th
RPM Way to install MySQL 5.6
mysql-server-5.6.27-1.el6.x86_64.rpmmysql-client-5.6.27-1.el6.x86_64.rpmMYSQL-SHARED-COMPAT-5.6.27-1.EL6.X86_64.RPM (Perl-dbd-mysql require)2.my.cnf[Email protected] lib]# VI/ETC/MY.CNF# for advice The change settings# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html[Mysqld]DataDir =/var/lib/mysqlLog_bin =/var/lib/mysql/bin-logSocket =/var/lib/mysql/mysql.sockSql_mode=no_engine_substitution,strict_trans_tables3.source Install
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.