MySQL List all Databases, List all Tables in a Database, List all columns in a Table (Ubuntu 14.04)

Running MySQL with super user privileges
mysql -u root -p

List all databases
SHOW DATABASES;

List Tables in a Specified Database
SHOW TABLES FROM databasename;

List Columns in a Specified Table from a Specified Database
SHOW COLUMNS FROM dbname.tablename;

Leave a Reply