It is common to have a large number of repeated records in a table in an application, but sometimes we want to filter duplicate data and retrieve a record of Repeated Records, next, I will introduce you to a method to retrieve one of the Repeated
Composite index is a common data Optimization Method in mysql. Next I will introduce the performance comparison of composite indexes in mysql.
Let's look at some test instances.
The Code is as follows:
Copy code
Select * from
Multi-instance startup means that I want to start multiple mysqld processes at the same time when I am helping a friend configure environmental sanitation. Next I will introduce the operation configuration method to you.
When the development and
Three methods are commonly used to add user and user permissions in mysql. One is to add users to the user table by using grant or using insert, another simplest way is to use phpmyadmin to add users.
1. grant statement
Format: grant select on
Event Scheduler is a new mysql event. It queries a Scheduler task class function. We can create an Event in mysql to regularly execute some SQL statements, in this case, we do not need to use the scheduled tasks of the system to execute the
We can use the Update and Insert commands to Update and save mysql Data. Next I will introduce the usage and differences between Update and Insert, for your reference.
MySQL Update data Update statement
Definition of update statement:
The UPDATE
I used to talk a lot about various methods for regular backup of mysql databases. Today I will introduce a super simple instance script for mysql backing up databases every day in linux.
So far, none of MYSQL is always normal.
Backup is king.
The
Yesterday, due to power loss in the data center, a large scale in the mysql database was inaccessible or in use. Later, I checked that I could use the mysql myisamchk command to fix the problem. Next I will introduce it.
Posted on December 31,200 9
This article briefly introduces some common commands for MySQL to move and rename data tables.
What should I do if I want to migrate the MySQL Table to another database, rename the Table, and change the names of the two tables?
How to migrate and
Today, I want to create a program to query data for one day, one week, and one month. I will summarize and share these SQL date query statements.
My date
First, we get the date format as follows: 2009-2-12, 2009-3-3, or 2009-10-12. We can use this
In addition to the where clause, we can use the if case Method to Determine the query result. This is more advanced than the where clause. I will introduce several conditional query instances.
Where condition Query
The Code is as follows:
To allow mysql to be remotely connected and used, we need to simply enable the mysql remote connection permission. Below I will introduce several solutions for MYSQL remote connection.
You need to create a remote account in MYSQL on the server. By
Today, I suddenly found that php + mysql on my server could not be opened, and the log showed Can \'t open shared library \ 'udf. dll \ 'error. Restart mysql + apache.
Error Message
Event Type: ErrorEvent Source: MySQLEvent Type: NoneEvent ID:
In mysql, if we want to perform Fuzzy Data Query, we can use like with the % number to perform the query. Next I will briefly introduce how to use mysql like.
Generally, mysql in queries can be written like this.
The Code is as follows:
The most common method to modify mysql parameters is directly in my. in cnf, modify and restart mysql. You can also use commands to directly modify mysql without repeating mysql. However, if the latter restarts mysql, the variable set will be
Sometimes we have configured MySQL master-slave replication, but there are new projects and databases coming in. We also hope that this data will allow mysql to achieve master-slave replication, next, we will introduce how to add a new database to
To return the latest inserted ID in mysql, we only need to call the mysql_insert_id () function in php after the insert operation to obtain the latest auto-increment ID.
How do I return the ID number of the auto-increment ID of the inserted
Select CONCAT ('drop table', table_name, ';') FROM information_schema.tables Where table_name LIKE 'dede _ % ';
"Dede" is the prefix of the table to be deleted. After this SQL statement is executed, a series of SQL statements are generated. You
In SQL statements, subqueries must be placed in parentheses. When executing a subquery, The subquery results are first queried, then, the results returned by the subquery are used as the query conditions for the outer query. Subqueries can be
Jquery + php + mysql second-level linkage example with the database. This is a second-level linkage menu of the city that uses juqery to interact with php in real time. In the past, we used js to present the second-level linkage menu, now let's use
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.