mysql commonly used system commands

desc table name; // table information
show columns from table name; // table field
describe table name; // table information
show create table table name; // create table statements
show create database database name; // display database information
show table status from the database name; // database state
show tables or show tables from database_name; // display the current names of all tables in the database
show databases; // display the names of all mysql databases
show processlist; // display system running all processes, which is currently executing the query. Most users can view their own process, but if they have the process privilege, you can view the process for all, including passwords.
show table status; // displays information database currently used or specified in each table. Information including the latest update time table type and table
show columns from table_name from database_name; // Display name columns in the table
show columns from database_name.table_name; // Display name columns in the table
show grants for user_name @ localhost; // display a user permissions, displaying results similar to the grant command
show index from table_name; // display the index show status table; explanation: some of the information display system-specific resources, such as the number of threads running
show variables; // display the names and values of system variables show privileges; explanation: display server supported by the different authorities
show create database database_name; // show whether the create database statement to create the specified database
show create table table_name; // show whether the create database statement to create the specified database
show engies; // display memory available after installation engine and default engine.
show innodb status; // display the status innoDB storage engine
show logs; // display the log BDB storage engine
show warnings; // error statement last executed generated, alerts and notifications
show errors; // only the last a wrong statement that executes in
show engine innodb status; // view deadlock information to
select SUBSTRING_INDEX (host, ':' , 1) as ip, count (*) from information_schema.processlist group by ip // current database connection ip number

show status queries running state, there are 300 + of data

Guess you like

Origin blog.51cto.com/13990437/2401401