The usage of MySQL show command

There are many basic commands in MySQL, and the show command is one of them. The use of the show command is easy to cause confusion among many users. This article brings together many usages of the show command. 
1. show tables or show tables from database_name; -- Display the names of all tables in the current database. 
2. show databases; -- Display the names of all databases in mysql. 
3. show columns from table_name from database_name; or show columns from database_name.table_name; -- Display the column names in the table. 
4. show grants for user_name; -- Displays a user's permissions, similar to the grant command. 
5. show index from table_name; -- Displays the index of the table. 
6. show status; -- Displays information about some system-specific resources, such as the number of running threads. 
7. show variables; -- Display the names and values ​​of system variables. 
8. show processlist; -- Displays all the processes running in the system, that is, the query currently being executed. Most users can view their own processes, but if they have process permission, they can view everyone's processes, including passwords. 
9. show table status; -- Displays information about each table in the currently used or specified database. The information includes the table type and when the table was last updated. 
10. show privileges; -- Displays the different privileges supported by the server. 
11. show create database database_name; -- Displays whether the create database statement can create the specified database. 
12. show create table table_name; -- Displays whether the create database statement can create the specified database. 
13. show engines; -- Displays the storage engines and default engines available after installation. 
14. show innodb status; -- Displays the status of the innoDB storage engine. 
15. show logs; -- Display the logs of the BDB storage engine. 
16. show warnings; -- Displays errors, warnings, and notifications generated by the last executed statement. 
17. show errors; -- only displays the errors generated by the last executed statement. 
18. show [storage] engines; -- Displays the available storage engines and default engines after installation.
Copyright statement: The content of this article is contributed by Internet users voluntarily, and this community does not own the ownership and does not assume relevant legal responsibilities. If you find any content suspected of plagiarism in this community, please send an email to: [email protected]   to report and provide relevant evidence. Once verified, this community will immediately delete the allegedly infringing content.


 

Original link

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326124621&siteId=291194637