Reprinted from: http://www.cnblogs.com/cchust/p/3952821.htmlIn the process of using MySQL, you may encounter a similar problem:[email protected] 07:42:00>select * FROM test where C1 like ' ab% ';+-----+| C1 |+-----+| ABC || ABD |+-----+Fuzzy
Date_format () Conversion format:Format description%A abbreviated week name%B Abbreviated month name%C Month, value%D Day of the month with English prefixes%Day of the D-month, value (00-31)%E-month day, value (0-31)%F microseconds%H Hours (00-23)%H
#group by
#group by + group_concat ()
#group by + aggregate function
#group by + have
#group by(1) Meaning of GROUP by: Group The results of the query in 1 or more fields, with the same field values as a group(2) Group by can be
Reported some variable errors, similar to "Time_zone" and other errorsSolve:[Email protected] conf.d]# vi/etc/my.cnf[mysqld]datadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.sock# Disabling Symbolic-links is recommended to prevent assorted security
MySQL IndexMySQL indexing is important for the efficient operation of MySQL, and indexing can greatly improve the retrieval speed of MySQL.For example, if the reasonable design and use of the indexed MySQL is a Lamborghini, then no design and use of
MySQL user management and permissions settingsUser ManagementMysql>use MySQL;ViewMysql> select Host,user,password from user;CreateMysql> create user Zx_root identified by ' xxxxx '; Identified by will store plaintext password encryption as a hash
1. Select the most applicable field propertiesMySQL is good at supporting large data volumes, but in general, the smaller the tables in the database, the faster queries are executed on it. Therefore, in order to achieve better performance when
--MySQL time date function type and use--1, Day (), month (), year ()--Returns the number of days, months, and years of the specified date;Select Day (Curdate ()) as ' date ' from dual;Select Month (Curdate ()) as ' month ' from dual;Select year
1. Display all databases of the data servershow databases;2. Create a databaseCreate database if not exits + DB name;3. Deleting a databaseDrop DATABASE + DB name4. Using the default databaseUse + database name;5. Create a data tableCREATE table if
One, index1.Innodb index is using B + Tree2. Try to simplify the where condition, e.g. do not show where ID + 3 = 5, which cannot use the index3. When the index is large, a column can be redundant to simulate a hash index4. Small tables do not need
Resolve MySQL Master never syncToday, MySQL's master and slave databases are not synchronized.First on the Master library:Mysql>show processlist; See if the next process is too much sleep. Found to be normal.Show master status; also normal.Mysql>
In MySQL 5.7.2 added log_timestamps This parameter, this parameter is mainly control error log, genera log, and so on log display time parameter.Changing the parameter to default UTC after 5.7.2 causes the log to be recorded in a slower time than
MySQL latency Association performance optimization method and mysql latency performance optimization
Background]
An error occurred while alerting the load of a business database. The cpu usr reached 30-40, which remained high. Use tools to view the
In CentOS 7, MySQL connections are limited to 214. centosmysql
Problems Found
Recently, I encountered a problem in the project. Due to the excessive number of connections, "Too has connections" is displayed, and the number of connections needs to be
Detailed description of the writing and summary of the database connection URL, detailed description of the Database Connection url
Detailed description of database connection URL writing and summary
Jdbc url = protocol name + sub-protocol name +
Solve the problem of Chinese garbled characters in MySQL5.5 database command lines in Windows 10, windows10mysql5.5
After the system is reset, the MySQL database installed a long time ago experienced Chinese garbled characters in the console query.
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