How to see all databases and tables in MySQL
Use SHOW DATABASES to see the MySQL databases your account can access. Pick one with USE, then run SHOW TABLES. If you want the rows inside a table, check its columns and run a SELECT.
List databases and select one
SHOW DATABASES;
SELECT DATABASE();The first statement lists names visible to your account. The second shows the current default database, which may be NULL. Your permissions decide which names appear. A viewer’s “all databases” list can still leave out databases your account cannot see.
MySQL documents these rules in SHOW DATABASES. Ask an administrator to confirm the intended account and grants when a database is missing, rather than immediately requesting global privileges.
See tables and views
Replace shop with a real database name from your result:
USE shop;
SHOW FULL TABLES;
SHOW COLUMNS FROM orders;SHOW FULL TABLES includes object type so you can distinguish a base table from a view. SHOW COLUMNS expects a real table or view name. A GUI’s refresh action may be needed after another session creates an object.
View a table’s rows
After confirming the schema, use a bounded query. These column names are illustrative:
SELECT id, status
FROM shop.orders
ORDER BY id
LIMIT 25;ORDER BY makes the intended order explicit. A primary-key tie-breaker matters if you sort by a column that contains duplicate values. A result limit controls returned rows; it is not a universal guarantee about query cost.
Diagnose a missing table
- Check the selected server and database, including any development/production distinction.
- Check spelling and case against the stored name.
- Confirm that the account has the required visibility and SELECT privileges.
- Distinguish an empty table from a table that is absent.
A permission error, no rows and an unknown-table error describe different problems. Save the exact message without credentials so a teammate can reproduce it.
Run the same inspection in a desktop client
plainDB’s MySQL connection lets you browse tables and run SQL on both supported desktop platforms. Its interface is a convenience over the database’s rules, not a replacement for them. See the connection walkthrough and MySQL’s database and table inspection tutorial.