Tuesday 17 January 2012

Mysql show

mysqlshow is another way to check the database details table and column information, let's check some of the basic commands  

shows available databases
# mysqlshow -pmysql

Display all tables in a DB
# mysqlshow -pmysql databasename

Display tables along with number of columns in a database
# mysqlshow -v -pmysql databasename
  
Display columns and Rows also
# mysqlshow -v -v -pmysql databasename 

Display column name along with column information for table in database 
# mysqlshow -pmysql databasename tablename
 
it displays information about wid column from tablename table.
# mysqlshow -pmysql dbname tablename wid  

Show all metadata information about a table.
# mysqlshow -i -pmysql dbname tablename  

Display both indexes and columns of a table. Please note that the indexes are listed at the bottom of the display after the column information.
# mysqlshow -k -pmysql dbname tablename


No comments:

Post a Comment