The SQL audit mainly accomplishes two purposes.
1, to avoid poor performance of SQL into the production system, resulting in lower overall performance
2, check the development of the design of the index is reasonable, whether you need to add an
UTF8 database, save emoticons, make an error
The code is as follows
Copy Code
Incorrect string value: ' \xf0\x9f\x98\x84\xf0\x9f ... ' for column ' content '
The wrong solution:
The code is as
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
Brief introduction:
MySQL's binary log can be said or MySQL's most important log, it records all the DDL and DML (in addition to the data query statement) statements, as an event record, but also contains the statement of the consumption of time,
Some content is processed using an SQL statement. MySQL reported error when executing a statement: Operand should contain 1 column
Literally, you need to have 1 columns of data.
My SQL statement is similar to this:
Update cdtable set cdcontent= '
Technical points
A stored procedure includes a name, a list of arguments, and a set of SQL statements that can include many SQL statements. The following is the process of defining a stored procedure:CREATE PROCEDURE Proc_name (in parameter integer)
MySQL view SQL statement execution history
Cat ~/.mysql_historyFor versions after MySQL version 5.1, you can start logging in the following ways. The ability to record SQL statements that include application execution.
MARIADB [(None)]> SET GLOBAL
To prevent users from inserting from the library, use the Read-only parameter:
Configuration:
[Root@slave-mysql data]# grep read-only/etc/my.cnfread-only
Test process:
Master Library Licensing All
Mysql> Grant all on *.* to ' imbyrd ' @ '
In daily work, we often encounter product classification, article classification and so on 修改不频繁 multi-level classification. The usual approach is similar to this structure:
General Practice
If you follow a multilevel query, you
1, first of all, need an account to get status information1.1 Authorize an ordinary user, can login into MySQL using the-e parameter show status get1.2 can also use mysqladmin extended-status to obtain2, add a section to the scheduled task, as
Xtrabackup has two main tools: xtrabackup and innobackupex.(1) xtrabackup can only back up InnoDB and XtraDB data tables, but cannot back up MyISAM data tables.(2) innobackupex-1.5.1 encapsulates xtrabackup, which is a script encapsulation, so
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
Sometimes you run show processlist in mysql, and then you will find that there are many such processes in the database:There are three reasons for sleep:1. Before the client program exits, it does not call mysql_close (). [write program negligence,
If I haven't written an article for a long time, do I want to write something? I will share my database design ideas, mainly aiming at the query optimization techniques for billions or more data on a single machine.If you only perform simple queries
IntroductionMySQL is a real multi-user, multi-thread SQL database server. SQL (Structured Query Language) is the world's most popular and standardized database language.MySQL is implemented in a client/server structure. It consists of a server
Install MySQL in Windows and use the official configuration wizard to generate my. ini, I thought it was very stable. Who knows that after more than 10 hours, the system response was very slow. Looking at the performance card of the resource manager,
MySQL is a powerful open-source database. With more and more database-driven applications, people have been pushing MySQL to its limit. Here are 101 Tips for adjusting and optimizing MySQL installation. Some tips are applicable to specific
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