show tables;
use database_name;
show tables;
Code language: SQL (Structured Query Language) (sql)
mysql -e 'show tables;' database_name
Copied mysql> DESCRIBE pet;
+---------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+-------------+------+-----+---------+-------+
| name | varchar(20) | YES | | NULL | |
| owner | varchar(20) | YES | | NULL | |
| species | varchar(20) | YES | | NULL | |
| sex | char(1) | YES | | NULL | |
| birth | date | YES | | NULL | |
| death | date | YES | | NULL | |
+---------+-------------+------+-----+---------+-------+
# First, select your database
USE yourDb;
# Then, simply
SHOW TABLES;
mysqlcheck -c mydatabasename -u root -p