Preface:
With the popularization of InnoDB, Innobackup has become the mainstream backup way. Physical backup for the new slave, the need for a full library recovery can be easily addressed.
But when the single table data mistakenly deleted, or a
TIMESTAMP setting defaults is default Current_timestamp
TIMESTAMP settings update automatically with table changes is on update current_timestamp
But because
There can be at most one field set in a table Current_timestamp
It is not possible to set
Monitoring SQL statement execution efficiency based on MySQL slow log
Enable MySQL log-slow-queries (slow query record).
In the Linux environment to find the My.cnf file (generally in/etc/mysql/), and then you may find that the file can not be
The scope of this article: a comprehensive description of MySQL database operations, divided into virtual host and server two situations.
Virtual Host
1, through the phpMyAdmin import and export function, this software generally only supports the
Perror 28
Error Code 28:no space left on device
SQL statement execution error: SELECT title,gid from Blog_blog WHERE Date Error writing file ' C:\WINDOWS\TEMP\MY9B6F.tmp ' (errcode:28)
Workaround:
1. Free C:\WINDOWS\TEMP\ Space
2. Because
--Data for the row with the largest (small) value grouped by a field
Copy Code code as follows:
/*
The data are as follows:
Name Val Memo
A 2 A2 (the second value of a)
The first value of a 1 a1--a
The third value of a 3 a3:
There are three ways to solve this problem:
1. Increase the value of the MySQL Wait_timeout property.Modify the/etc/mysql/my.cnf file and set it in the [mysqld] section:
# Set A connection to wait 8hours in idle status.
Wait_timeout
Previously thought that from the top to the next unified use of UTF-8 on the rest of the peace of the day, but today in the crawl Sina Weibo data is still encountered the exception of characters.
The data captured by Sina Weibo throws an exception
In the previous article (MySQL backup and restore), we mentioned Lengbei. But there is a problem, we store the data file is stored in the current local disk, if the disk is hung, then we stored data is not lost, so that the backup data is not failed,
Replication Class Tools1. Pt-heartbeatFunction Introduction:Monitor MySQL replication latencyUsage Introduction:Pt-heartbeat [OPTION ...] [DSN]--update|--monitor|--check|--stopMeasure how much time is left behind the main MySQL or main PostgreSQL,
Have been heard MySQL5.5 performance is very NB, so the recent plan to test, convenient time to upgrade the bbs.kaoyan.com to this version of the database. Today I just saw a summary of MY.CNF optimization, although it has not been my own practice
First, the concept:① Database Synchronization (master-slave Synchronous---Primary database writes to write data from server)② database Synchronization (primary primary Sync---Two database servers write data to each other)
Second, for examplePrimary
The last two days to do the project is always confused problem, this is not just the MySQL Chinese garbled problem solved, the following small set my solution to share to everyone for your reference, but also convenient for their own inspection.
Show profile was donated by Jeremy Cole to the MySQL community version. The default is off, but the session level can turn on this feature. Opening it allows MySQL to collect the resources that are used when executing the statement. For statistical
When the MySQL client connects to the MySQL server (the process is: mysqld), Mysqld creates a new thread to process the request. The thread first checks whether the host name is in the hostname cache. If not, the thread attempts to resolve the host
This paper introduces the use of Group_concat functions in MySQL, such as select Group_concat (name).
Group_concat function in MySQL
The complete syntax is as follows:
Group_concat ([DISTINCT] The field to connect [order by Asc/desc sort field]
Today found MySQL's master-slave database is not synchronized
first the Master library:
Mysql>show processlist; Check to see if the process is too much sleep. Found to be normal.
Show master status; is normal.
Mysql> Show master status;
+-----------
1. Local BackupTo write an automatic backup script:Vim/var/lib/mysql/autobakThe contents are as follows:
Copy Code code as follows:
Cd/data/home/mysqlbak
rq= ' Date +%y%m%d '
/usr/local/mysql/bin/mysqldump
The MySQL query cache is analyzed in detail from five angles: The working principle of query cache, how to configure, how to maintain, how to judge the performance of query cache, and the suitable business scenario analysis.
Working principle
The
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