By default, mysql will automatically reverse parse. If we cannot handle the problem, we will find a large number of unauthenticated user prompts when viewing show processlist, the following describes how to solve unauthenticated user.
Example
Test environment:
Master server: CentOS 5.2 Mysql 5.1.35 source code IP: 192.168.1.22
Slave server: CentOS 5.2 Mysql 5.1.35 source code IP: 192.168.1.33
Configuration:
I. master server
1.1 create a replication user with the replication slave
Environment:Master server: centos 5.2 mysql 5.1.35 source code IP: 192.168.1.22Slave server: centos 5.2 mysql 5.1.35 source code IP: 192.168.1.33Configuration:I. master server1.1 create a replication user with the replication slave permission.Mysql>
MYSQL master-slave switchover
1. modify the configuration fileRead-only = 1 (master database)# Read-only = 1 (slave database)
2. view the status of the Master/Slave DatabaseShow slave status \ GShow master status \ G
3. Operate the slave
The solution is to modify etcmysqlmy. cnf and add the following line
The solution is to modify/etc/mysql/my. cnf and add the following line
The solution is to modify/etc/mysql/my. cnf and add the following line:
Set-variable = max_connections = 500
Mysql metadata lock (3), mysqlmetadatalock
Preface
The MDL lock is mainly used to protect the metadata of Mysql internal objects. The MDL mechanism ensures the concurrency of DDL, DML, and SELECT query operations. MySQL Meta Lock (1) and MySQL Meta
In mysql, SHOWSTATUS is our best friend. It allows us to quickly view the running status and optimize the database in a timely manner. Below I have summarized some usage.
In mysql, show status is our best friend. It allows us to quickly view the
The following articles mainly describe how to implement the basic usage of MySQL Databases in linux. The following describes the specific operations in the article, if you are interested in the actual operations, I hope the following articles will
View the mysql execution plan bitsCN.com
View the execution plan of mysql. the SQL statement is executed for 4 minutes, and the message_message contains 1000 million data. the execution plan of mysql is learned.
Select * from message_message where
1. A deadlock condition has been ruled out.
2.show processlist; After nearly thousands of query processes are blocking.
3. Extract the two SQL that waits up to 1 seconds after it is executed alone.
We help analysis of what needs to be analyzed, one
Mysql database bidirectional synchronization hot standby bitsCN.com
Environment:
Master server: 10.224.194.239
Slave server: 10.224.194.237
Steps:
1. create backup users in Master/Slaver mysql db respectively:
Grant file on *. * TO backup@10.224.19
This article describes how to find the deadlock ID in the MySQL thread. the method described in this article is mainly to find the deadlock from the data dictionary. if you need a friend, you can refer to it, how can this problem be solved? Find the
1. deadlocks have been ruled out. 2. showprocesslist; nearly a thousand query processes are blocked. 3. extract the two most pending SQL statements, which takes nearly one second after being executed separately. We can help you analyze what else
Mysql prompts Writingtonet to solve bitsCN.com
Mysql prompts Writing to net solution
Recently, it was found that the cpu usage of a database has been compared. More than 200%.
First, check the slow log of the database and set the slow log to 5
MHA Daily Maintenance CommandsHttp://m.blog.chinaunix.net/uid-28437434-id-3959021.html?/13033.shtml1. Check if SSH login is successfulMasterha_check_ssh--conf=/etc/Masterha/app1.cnf2. See if replication is well
Using Mydumper backup occurs waiting for table flush, which causes all threads to be unreadable and writeVersion Mydumper 0.9.1OS centos6.6 x86_64MySQL 5.6.25-logMydumper backup option Mydumper-h $HOST-u $USER-P $PASSWORD-P $PORT-G-e-r-c-x ' ^
the last two or three weeks accumulated some common knowledge points, mainly used in common work, share.
Postgre Database Import and Export
1. First configure the bin path of the Postgre to the path by using the
High-Performance MySQL reading notes find out who holds the lock bitsCN.com problem background: in actual use of MySQL, if the access volume is large, it is likely that there will be a large number of Locked state processes, however, it is not easy
A good tool for connecting to killMySQL is part of perconatoolkit. when there are many idle connections, the maximum number of connections is exceeded, and a problematic SQL statement causes high mysql load, you need to kill some connections. This
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.