mysql> show processlist;+----+------+-----------+------+---------+------+-------+------------------+| Id | User | Host | db | Command | Time | State | Info |+----+------+-----------+------+---------+------+-------+------------------+| 7 | Root |
In the daily MySQL operations, it is often to query the current MySQL executing SQL statements and other running MySQL-related threads, which is used in the MySQL processlist command.Mysql> show processlist; //Query the SQL statement being
Asynchronous Master-slave replication
Master-Slave Deployment steps:
Backup restore
Use mysqldump or Xtrabackup
Restore existing base data from the main library to the library
Authorized
Mysql master-slave replication practicesAsynchronous master-slave Replication
Master-slave deployment steps:
Backup and Restoration
Use mysqldump or xtrabackup
Restore the existing basic data of the master database to the slave
(1) Kill all MySQL connection processesFor i in ' mysql-uroot-pzhangyun-bse ' show Processlist | Grep-v "Show Processlist" | awk ' {print '} 'DoMysql-uroot-pzhangyun-e "Kill $i"DoneNote: The show processlist process of its own command is filtered
Close all connections:# #把全部的MySQL连接kill掉For I in $ (mysql-uroot-p123456-bse "Show processlist" | awk ' {print $} ');d o mysql-uroot-p123456-e "Kill $i";d on E# #把admin用户的连接kill掉For I in $ (mysql-uroot-p123456-se "Show processlist" | awk ' {if ($2==
Main Library Outage SolutionAssuming an unexpected incident, master down, the current requirement is to upgrade the 192.168.1.102 to the main library, and the other to the librarySteps:1. Ensure that all relay log updates are complete and that the
Table of Contents
MySQL Show Status-open database connections
MySQL Show Processlist
MySQL Show Status-summary
MySQL "Show status" Faq:can you demonstrate the MySQL show statuscommand to show MySQL variables and Status
MySQL master-slave replication principle and architecture, mysql master-slave architecture1 copy Overview
The built-in replication function of Mysql is the basis for building large and high-performance applications. This distribution mechanism
Test Environment: Master server: CentOS5.2Mysql5.1.35 source code IP: 192.168.1.22 slave server: CentOS5.2Mysql5.1.35 source code IP: 192.168.1.33 configuration: 1. master server 1.1, create a copy user, with the replicationslave permission. Test
High-Performance MySql evolution (14th): Replication (Replication) bitsCN.com
Overview
The built-in replication function of Mysql is the basis for building large and high-performance applications. This distribution mechanism replicates data from a
Turn: most of the time to solve the mysql lock table! Lock the table accidentally! Here is the ultimate solution to the lock table! Case 1: mysqlshow? Processlist; if you see few SQL statements, mysqlkill? Thread_id; can solve the problem of kill
MHA implements manual switching of mysql Master/Slave databases, and mhamysql Master/Slave Databases
This article describes how MHA implements manual switching between the mysql master database and slave database for your reference. The specific
Analysis of slave monitoring latency in MySQL, mysqlslave
In the MySQL replication environment, we usually judge the SLAVE latency only based on the value of Seconds_Behind_Master. This is acceptable in most cases, but not accurate enough. More
MySQL permission bitsCN.com
I. permission table
Three permission tables in the mysql database: user, db, host
The access process of the permission table is:
1) Check whether the connected IP address, user name, and password exist in the table from
In php, how does one use mysqli connection to obtain the mysql process List, which is similar to showprocesslist? Php version: 5.2.17 & nbsp; mysql version: 5.0.14 uses the connection method of mysqli. to obtain the list of current database
MySQL version used: mysql4.0.x
MASTER: 192.168.1.102SLAVE: 192.168.1.109
Modify C:/winnt/My. ini for Windows host. Modify/etc/My. CNF for Linux host.
1. Master operations1. modify my. ini##############Server-id = 1Log-bin =
CPU utilization up to 100% processing process
first, the search process, mainly to find the locked table of the process ID
Show Processlist
From the above table, you can clearly see the slow query statement (just show some of the data), general
1.MySQL Performance Tuning IdeasWhat if a server has a long time load too high/ periodic load is too large , or occasionally stuck how to handle ?is it a cyclical change or an occasional problem ? is a problem with overall server performance , or
MySQL provides replication functionality starting from 3.23, which means that the DDL and DML operations of the main library are routed through the Binlog file to be executed from the library, keeping the main library and synchronizing the data from
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.