SQL injection of commonly used MySQL query

MySQL is a very broad use of the database, most sites are using MySQL, so it is important to be familiar with the injection MySQL database.

First of all the relevant knowledge under MySQL injection

After MySQL5.0 version, MySQL database stored by default in a "information_schema" database, in the library, SCHEMATA, TABLES and COLUMNS three table name must remember.

SCHEMATA table to store all the library name of the database created by the user, the database name in the record table field SCEMA_NAME.

TABLES Table stores all database and table names in the database created by the user, is recorded in the database table column names weiTABLES_SCHEMA library and table names and TABLE_NAME.

All of the library name database, table and field names COLUMNS table stores created by the user, respectively TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME.

SQL query

Query from the library name, table name using the select field names without knowing any conditions of the situation.

Use select library name from the field name, table where known conditions known in the case of a known condition field name = "value known conditions', when a plurality of conditions are known, and may be used to connect statements.

limit the use of the format limit m, n, where m refers to the recording start position, starting from 0, the first record indicates, n refers to the n records taken

Commonly used functions

View the current site is using the database: database ()

View the current user: user ()

View the current mysql version: version ()

 

Before learning SQL injection, learn a little knowledge and basic grammar database, the database have a rough idea of ​​our study will be of great help.

Guess you like

Origin www.cnblogs.com/lzlzzzzzz/p/11804451.html