mysql own database information as well as their initial introduction in the use of penetration testing

mysql database comes information_schema, mysql database, performance_schema database, there are several versions of the test database will be used for testing.
Here Insert Picture Description

information_schema database

information_schema provides access to database metadata. (Metadata is data about data. For example a database, a data table, the corresponding relationship field, the data type of the column, access rights, etc.)

mysql> show tables from information_schema;

Here Insert Picture Description

SCHEMATA表:提供了当前mysql实例中所有数据库的信息。是show databases的结果取之此表。
TABLES表:提供了关于数据库中的表的信息(包括视图)。详细表述了某个表属于哪个schema,表类型,表引擎,创建时间等信息。是show tables from schema_name的结果取之此表。
STATISTICS表:提供了关于表索引的信息。是show index from schemaname.tablename的结果取之此表。
USER_PRIVILEGES(用户权限)表:给出了关于全程权限的信息。该信息源自mysql.user授权表。是非标准表。
SCHEMA_PRIVILEGES(方案权限)表:给出了关于方案(数据库)权限的信息。该信息来自mysql.db授权表。是非标准表。
TABLE_PRIVILEGES(表权限)表:给出了关于表权限的信息。该信息源自mysql.tables_priv授权表。是非标准表。
COLUMN_PRIVILEGES(列权限)表:给出了关于列权限的信息。该信息源自mysql.columns_priv授权表。是非标准表。
CHARACTER_SETS(字符集)表:提供了mysql实例可用字符集的信息。是SHOW CHARACTER SET结果集取之此表。
COLLATIONS表:提供了关于各字符集的对照信息。
COLLATION_CHARACTER_SET_APPLICABILITY表:指明了可用于校对的字符集。这些列等效于SHOW COLLATION的前两个显示字段。
TABLE_CONSTRAINTS表:描述了存在约束的表。以及表的约束类型。
KEY_COLUMN_USAGE表:描述了具有约束的键列。
ROUTINES表:提供了关于存储子程序(存储程序和函数)的信息。此时,ROUTINES表不包含自定义函数(UDF)。名为“mysql.proc name”的列指明了对应于INFORMATION_SCHEMA.ROUTINES表的mysql.proc表列。
VIEWS表:给出了关于数据库中的视图的信息。需要有show views权限,否则无法查看视图信息。
TRIGGERS表:提供了关于触发程序的信息。必须有super权限才能查看该表

Through this information_schema database can query the data store information (if user rights), simple implementation with select syntax of the query:
1. All databases:

mysql>Select schema_name from information_schema.schemata;

Here Insert Picture Description
2.traccar database contains data tables:

mysql> select table_name from information_schema.tables where table_schema like "traccar";
或者:
mysql> select table_name from information_schema.columns where table_schema like "traccar" group by table_name;

Here Insert Picture Description
3.tc_users field data table:

mysql> select column_name from information_schema.columns where table_name like "tc_users";

Here Insert Picture Description
4. Query tc_users data:

如果没有限制那就可以不要第3步,简单粗暴:
mysql> select * from traccar.tc_users;
利用第3步查询到的字段名(这样可以绕过一些输出限制):
mysql> select id,name,email from traccar.tc_users;

Here Insert Picture Description

mysql database

This is the core database mysql, sql server is similar to the master table, control and management information the user is responsible for the database is stored, permission settings, keywords, and so they need to use mysql. You can not be deleted, if mysql is not very understanding, and do not easily modify the database information table inside.
Here Insert Picture DescriptionSimply look at user data table (a habit, more sensitive data contains account information) which data storage:
Here Insert Picture Descriptionby field names can know that the data table database stores information about users, including the host, user name, password (by password ()), various encryption function permissions

performance_schema database

mysql 5.5 version adds a performance optimization engine: PERFORMANCE_SCHEMA This feature is off by default:
you need to set the parameters: performance_schema can start this function, the parameters are static and can only write in my.ini can not be dynamically modified.

Here Insert Picture DescriptionHere data table is divided into several categories:
. 1) Setup Table: setting table, to configure the monitoring option.
2) current events table: Record the current thread that is what happened.
3) the history of the occurrence of various events history table Table
4) summary table of statistics of events
5) Miscellaneous table, mess table.
setup_consumers describe various events
setup_instruments description table name in the database and whether the monitor is turned on.
setup_timers monitoring options have been described time interval sampling frequency

Simply look at the hosts data tables, users data sheets, accounts Data Sheet:
hosts the data table records the number of online hosts and the total number of history:
users data table records database the number of users online and total history:
Information Accounts data table records the hosts and users Data Sheet collection:
Here Insert Picture Description
performance_schema monitor the operation of the database and the database will track when traceability is a place penetration attacks.

Published 13 original articles · won praise 8 · views 978

Guess you like

Origin blog.csdn.net/qq_40334963/article/details/104276553