1. ORDER BY id DESCDesc: Descending, that is, from large to small, ASC ascending is from small to large2. When more than one field is sorted:For example: ORDER by ID desc,sort desc;Prioritize by ID in descending order, if the ID is the same, then
First, enter the net stop MySQL in cmd, or close the MySQL registered service in the system service. then in the My.ini file, [mysqld] Add the following line: Skip_grant_tables mysql-uroot-p Enter any password can be logged into the database, enter
There are three ways to drive MySQL,1, the first is to put the jar package in the project directory, by adding a jar package, is the use of relative address, so that the project can be copied to other computers may also be used2, the second method
This problem may be caused by the fact that I did not install the default pathWorkaround:Because the MySQL default mysql.sock is in/var/lib/mysql/mysql.sock, but the Linux system always goes to/tmp/mysql.sock to find, so will error[Email protected] ~
MySQL BULK INSERT data1. For MyISAM types of tables, you can quickly import large amounts of data in the following ways.ALTER TABLE tblname DISABLE KEYS;Loading the dataALTER TABLE tblname ENABLE KEYS;These two commands are used to open or close an
1. Remove the extra self-compiled kernelEach time the Debian release kernel updates, there are always some kernel options that do not match their own hardware, to compile the kernel themselves. The extra kernel takes up extra hard disk space. I
There are two ways to import: one is to use graphical tools, such as SQLyog, Navicat, etc., and the other is to use the MySQL command line interface. The following are respectively described:One: Command line interface1. Start MySQL:2. Log in to
This article describes how to modify the parameter variables without restarting mysql.
In general, updating mysql configuration my. cnf requires restarting mysql to take effect, but sometimes mysql is online and may not be allowed to be restarted.
I used to write a stored procedure on MSSQL. I have never written or used it on MYSQL. I need to use MYSQL today, write a part of the stored procedure required by the project and summarize the work. The database structure is not provided here. I
With the improvement of a large number of default options, MySQL 5.6 has fewer options to be optimized than earlier versions. In this article, I will describe the configuration items to be optimized.
InnoDB settings
1. innodb_buffer_pool_size--
Images, files, and binary data are never stored in the mysql database..Many people think that since the database supports BLOB-type data, there must be no error in inserting files into the BLOB field !? Wrong, not like this! In many database
When the mysql database storage engine is MyISAM, data tables may be locked in the case of large traffic volumes, which may cause users to return 502 when they connect to the website, in this case, you need to convert the MySQL database MyISAM
1. Check the encoding of your installed mysql.
2. Check the encoding supported by Mysql.
3. view the database code
4. view the data table encoding (show create table user \ G ;)
5. Modify the my. ini file to modify the encoding: add the
There are two import methods: one is to use graphical tools, such as SQLYog and Navicat, and the other is to use the MySql command line interface. The following sections describe:
I. command line interface
1. Start mysql:
2. log on to mysql:
Original article: What to tune in MySQL 5.6 after installationWithImprovement on a large number of default optionsMySQL 5.6 has fewer options to be optimized than earlier versions. In this article, I will describe the configuration items to be
This is a special feature of MySQL.
In concept, NULL means "no value" or "unknown value", and it is regarded as a slightly different value. To test NULL, you cannot use arithmetic comparison operators such as =, Mysql> SELECT 1 = NULL, 1! = NULL, 1
We often encounter fuzzy condition queries when using queries, and fuzzy queries involve string mode matching.
Here, we will mainly talk about two aspects: standard SQL pattern matching and extended regular expression pattern matching.
I. matching
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.