A common understanding error: MySQL does not execute SQL statements when executing explain, in fact, if the query's From field has a subquery, explain executes the subquery.
Explain can only interpret select queries, and Update,delete,insert needs
MySQL is stored in disk, all kinds of natural and man-made disasters will result in data loss. Large companies when we often need to do good data hot and cold preparation, for small companies to do all the data backup needs to spend a lot of costs,
First, modify the Linux default IO scheduling algorithm.
Linux default IO scheduling algorithm for CFQ, need to modify to Dealine, if it is SSD or PCIE-SSD equipment, need to modify to NoOp, you can use the following two ways to modify.
1, online
Q:
My question when I write a query condition is as follows:
If I want to write all the records in a field that contain the word "Li"
$str = "Li";
SELECT * FROM table where field like '% $STR% ';
In addition to the records that contain the word "Li",
The functionality provided through MySQL
Export
Command:
Mysqldump-u user name-P database > database. sql
Example:
The code is as follows
Copy Code
Mysqldump-u root-p db1 > Db1.sql (Backup of database db1 to Db1.sql)
1. Check CentOS's own MySQL Yum list installed | grep mysql 2. Delete CentOS's own MySQL # when the results are displayed as complete! That is, uninstall completed yum-y remove mysql-libs.x86_64 3. Check the version number of MySQL in the
Reduce access to Mysql1. Avoid repeated searches for the same data:The application needs to clearly understand the access logic of the database and access to the same table. Try to concentrate on the same SQL access and extract results at a time to
If you choose mysql database as a data persistence tool, you need a reasonable log configuration, which will help you to troubleshoot and back up and recover data!First, we can use the following MySQL SQL to query the log configuration in
Mathematical functionsBecause MySQL contains a series of arithmetic operations, the relational database management system supports many mathematical functions.ABS (x); // returns the absolute value of x.ACOS (x); // returns the arc cosine of x
Value typeThe numeric type is roughly divided into two categories: one is an integer, and the other is a floating point or decimal number.The integer type is commonly used as the int type and can be in the range of (-2147483648,2147483648.Float,
Create a database tableIt is too common to create a database table. If you use a database, you can use the create statement to create a database table. See the following syntax:Create table tbl_name (create_definition,...) [type =
Mysql queries are case-insensitive by default, for example:Select * from table_name where a like 'a % 'select * from table_name where A like 'A %'The results are the same.To make mysql queries case sensitive, you can: Select * from table_name where
1. Have mysql been installed in the query system?Command:Yum list installed mysql *AndRpm-qa | grep mysql * Check whether the mysql installation package exists.Command: yum list mysql * 2. Install the mysql clientCommand: yum install mysql 3.
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