2.2 mysql基础知识
mysql >=5.0
1. 用于储存mysql数据库元数据的information_schema库
- schemata表存储数据库信息
- schema_name字段 存储数据库名
- tables表存储表的信息
- table_schema 对应的数据库名
- table_name 对应的存储表名
- columns表存储列信息
- table_schema 对应的数据库名
- table_name 对应的表名
- column_name 对应的列名
2.常用的函数
- user()
- database()
- version()
- 关键字: limit 0,1
limit 1 offset 0 #过滤','
- extractvalue
- updatexml #报错注入
select * from users where id = 1 and updatexml(1, concat(0x7e, (version()), 0x7e), 0);
- floor()
- ceil()
- mid(version(),1,1)
mid(version() from 1 for 1) #过滤','
- substr(version(),1,1)
- substring(version(),1,1)
- group_concat(username,0x3a,password)
- concat(version(),'|',user())
- concat_ws('|',1,2,3)
- char(49)
- hex('a')
- unhex(61)
- sleep()
- benchmark
- get_lock
3.注释符号
- -- -
- #
- /**/
- 内联注释/*!union */
- ;
4.空白字符
- SQLite3: 0A 0D 0C 09 20
- MySQL5: 09 0A 0B 0C 0D A0 20
- PosgresSQL: 0A 0D 0C 09 20
- Oracle 11g: 00 0A 0D 0C 09 20
- MSSQL: 01-20

浙公网安备 33010602011771号