Mysqldump is a database backup and restoration tool that comes with mysql. I don't think many of you have used it, or you have been using phpmyadmin to operate it, or you can directly package the database on the server, next let's take a look at the
Today, because the server is automatically shut down, the error "fail1Table" appears when I open the website again. \ xxx "is marked as crashed and shoshould be retried red. After analysis, I found two ways to solve this problem on the Internet, for
Many program friends are writing paging, especially mysql has limit n and m. Paging is simple, but we do not know that there is no problem with paging tens of thousands of data, but it cannot be used in the case of millions or tens of millions.
This article describes how to enable MySQL full-text Indexing Based on the mysqlcft plug-in, because mysql currently does not provide satisfactory support for Chinese fulltext, let's take a look at how to use the mysqlcft plug-in to enable your
In this article, count (*), broupby, and order by are used to query the most repeated records in the mysql database and list them in descending order.
The Code is as follows:
Copy code
SELECT keyword, count (*) AS countFROM
This article only tells you about some file operations related to mysql udf. dll Elevation of Privilege intrusion. You can configure security here. If you need it, you can check it out.
The Code is as follows:
Copy code
Net
Because the subcategories of a website today use the SQL instr () and LOCATE () string operation functions, let's take a note and put it down. If you need them, please refer to them.
INSTR (str, substr)Returns the first occurrence position of the
This is a method for modifying the password of the mysql root User in command mode. You can easily perform this operation by clicking the doscommand.
Switch to the mysql installation directory under cmdExampleD:/mysql/binPrerequisites: the mysql
Today, when using the innodb ENGINE of mysql, InnoDB registry as a storage engine failed suddenly appeared. unknown/unsupported table type: innodb. the system becomes unable to start normally. After analyzing and making a record, we can refer to
In MySQL 5.0.3 and later versions, the length of the varchar data type can reach 65535, that is, 65532 bytes of data can be stored, and the start and expires bits occupy 3 bytes. That is to say, in versions earlier than 5.0.3, data stored in fixed
Calculation yearsIf you want to calculate the person's age by birthday, you can use the following statement:
SELECT DATE_FORMAT (FROM_DAYS (TO_DAYS (now ()-TO_DAYS (@ dateofbirth), '% y') + 0;
2. Difference between two time pointsReturns
1. Use the rowid Method
2. Use the group by Method
3. Use the distinct method
1. Rowid Method
The statement is as follows:Query data:
Select * from table1 a where rowid! = (Select max (rowid)
From table1 B where a. name1 = B. name1 and a. name2
I remember I wrote a diary on this site that records articles related to the master-slave mysql tutorial database tutorial synchronization and backup. I don't know if a friend has read it, but the method is very simple, this is also certainly
Returns the latest ID method when inserting SQL data.
SELECT LAST_INSERT_ID (). SELECT @ IDENTITY can be connected. But that brother hasn't done it by the afternoon. Because I don't know how to run it .. Projects are all three layers. It is
Modify the mysql tutorial engine
Modify my. ini and add
Default-storage-engine = INNODB
The red font indicates the engine name to be specified.
Use SQL statements to modify the engine of a table:
Alter table tableName type = InnoDB
My. ini file for
SQL as Alias usage
Mysql tutorial> create table Topic (-> TopicID smallint not null AUTO_INCREMENT
Primary key,-> Name VARCHAR (50) not null,-> InStock smallint unsigned not null,-> OnOrder smallint unsigned not null,-> Reserved smallint unsigned
When I set the database tutorial field and encountered the numeric type, such as int (4), I once thought it was a length. When I tested it, I found that no matter how many fields I set, the length of the inserted data is not affected. The related
SQL statement for deleting duplicate dataMethod 1
Assume that the duplicate fields are name and address. You must obtain the unique result set of the two fields.Select identity (int, 1, 1) as autoid, * into # tmp from tablenameSelect min (autoid) as
Mysql tutorial database tutorial backup
When using mysql databases, database backup is the most common and important. So we will first introduce database backup. Database Backup is also a formal database backup method. It shares the same concept
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.