1. in MySQL installation and configuration of fedora, mariadb is a branch of mysql which is directly installed using yum install mysql. It is not much different from mysql in use. But there is a difference. Maybe it's a branch after all. Mariadb5.6
Because mysql user-defined functions cannot output two or more results, you need to use the mysql stored procedure.
The following is an example.
SQL statement:
Drop procedure if exists 'testguocheng ';
Create procedure 'testguocheng' (IN 'sql1'
In MySQL, order by has two sorting methods:
1. Use ordered indexes to obtain ordered data
2. File Sorting
When you use explain to analyze and query, you can use ordered indexes to obtain ordered data and display Using indexes. The File Sorting
In the past, I used the limit, 20 Method for paging in mysql. I believe you are the same, but to improve the efficiency, make the paging code more efficient and faster, what should we do?
Part 1: Let's take a look at the basic principles of
In Linux, MySQL installation has always been quite troublesome, because the previous installation was caused by complicated configurations. Today, you need to use Qt to connect to MySQL in Linux. Then install and configure one.
1) First, check
When I installed mysql again today, I always showed a 1045 error at the end. I gave up how many times I had to use qq manager, which is known as a powerful qq manager. Then I searched the internet. The general steps are as follows:
1. Delete mysql
Sometimes I am lucky. When I think that I have mastered a certain knowledge point, another problem occurs immediately, so that I can know that my previous cognition is incomplete.
As described in my previous blog post, if an auto-increment field
Show status like 'value'; query the performance of the MySQL database.
Value parameter Connections: Number of Connections to the MySQL server Uptime: MySQL Server launch time Slow_queries: Number of slow queries Com_lelect: Number of query
Back up a database using the mysqldump command
Basic Syntax: mysqldump-u username-p dbname table1 table2...> BackupName. SQL back up multiple databases
Syntax: mysqldump-u username-p -- databases dbname1 dbname2> bankupName. SQL back up all
Okay, I admit it was a major mistake in my project. During the trial run of this project, I modified the length and value of the database field twice, in order not to affect the existing data, I can only find another way to dynamically add, delete,
Mysql Chinese Garbled text is a common problem, and it is not difficult to solve it. This article will be guided by how to find and solve the problem when I encounter it, to present the ideas and processes for analyzing and solving the
Although this situation should not happen, we should have designed it in advance and won't be able to change it in the future, but due to the negligence of our previous work, to be honest, it is not only my personal negligence, but also the
After group by is used, the queried list is sorted by the default asc sequence of the primary key. order by can only be used for the grouped list because the priority of order by is lower than that of group, so how can we solve the grouping Sorting
You can use the instr function to determine the position where the mysql search character appears in the field string. This is a bit like the instr function in asp. I hope this tutorial will be helpful to you.
Usage:
INSTR (ori_str, sub_str)
MySQL
To find out the inefficient SQL statements in mysql, you can use EXPLAIN to analyze the inefficient SQL statements. However, before using EXPLAIN, you need to enable mysql slow query logs to use EXPLAIN, let's take a look.
In the face of rapid
This article introduces how to solve the problem of HAVING without group by in MySQL. If you don't want to use group by directly, you can refer to this article.
Today, a student gave me a response. There is a table whose id is the primary key. In
This article focuses on the security configuration of Memcache to prevent unauthorized data reading. If you encounter such problems, you can refer to it.
The memcache server directly performs operations after being connected through the client
Recently, it has always been a headache to initialize data for the current project, and the auto-increment of database IDS is getting bigger and bigger, so we need to re-start auto-increment from 1: use the following method:Method 1: If no data is
In the mysql database, the three functions CONCAT () CONCAT_WS () GROUP_CONCAT () are connection strings, but there are also some differences between them. Let's talk about CONCAT (). Use CONCAT () if one character is null, all successful
Mysql self-join queries some data first Based on the condition and then returns the returned value to query some data. This is mysql self-join. Of course, left join can also be used, next let's take a look at the usage of mysql self-connection.
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