Tables/databases/processlist/user
Showtables or showtablesfromdatabase_name;
Explanation: displays the names of all tables in the current database.
Showdatabases;
Explanation: displays the names of all databases in mysql.
Showprocesslist;
Explanation: displays all processes running in the system, that is, the query currently being executed. Most users can view
Their own processes, but if they have the process permission, they can view all processes, including passwords.
ShowgrantsforX_user;
Table
Desctable;
Explanation: display table structure
Showtablestatus;
Explanation: displays information about each table in the currently used or specified database. Information includes the table type and the latest update time of the table.
Showcolumnsfromtable_namefromdatabase_name; or showcolumnsfromdatabase_name.table_name;
Explanation: displays the column name in the table.
Showindexfromtable_name;
Explanation: displays the table index.
Warnings/errors
Showwarnings;
Explanation: displays errors, warnings, and notifications generated by the last executed statement.
Showerrors;
Explanation: only displays Errors generated by the last statement.
Procedure
Select 'name' frommysql. procwheredb = 'your _ db_name 'and 'type' = 'processed'
Showprocedurestatus;
Showcreateprocedureproc_name;
Showcreatefunctionfunc_name;
Binlog
Showbinlogevents [IN 'Log _ name'] [FROMpos] [LIMIT [offset] row_count]
Mysqlbinlog -- start-date = '2017-09-051: 24' -- stop-date = '2017-09-051: 26 '/mysqlLog/up04/logs/mysql-bin.011557-v-v -- base64-output = DECODE-ROWS>/data/jiangxu4.txt
Mysqlbinlog -- start-position = "63933950" -- stop-position = "63940929"/mysqlLog/up04/logs/mysql-bin.011557 -- no-defaults-v -- base64-output = DECODE-ROWS
Other
Showgrantsforuser_name @ localhost;
Explanation: displays the permissions of a user. The display result is similar to the grant command.
Showstatus;
Explanation: displays information about specific system resources, such as the number of running threads.
Showvariables;
Explanation: displays the name and value of the system variable.
Showprivileges;
Explanation: display different permissions supported by the server
Showcreatedatabasedatabase_name;
Explanation: whether the createdatabase statement can create a specified database
Showcreatetabletable_name;
Explanation: whether the createdatabase statement can create a specified database
Showengies;
Explanation: displays available storage engines and default engines after installation.
Showinnodbstatus;
Explanation: displays the innodb Storage engine status.
Showlogs;
Explanation: displays bdb storage engine logs.
EVENT
SHOWVARIABLESLIKE 'event _ schedation ';
Explanation: display the event activation status
SETGLOBALevent_scheduler = ON;
Explanation: Enable event
Triggers
UseXXDB; showtriggers;
Usexxdb; droptrigger 'triggers _ name ',
Usexxdb; showtrigger 'triggers _ name ',
Explanation: View and delete a trigger.