How to show all the tables from multiple databases
You cannot do
SELECT * FROM database
but you can do
USE DATEBASE;
SHOW TABLES;
or even better:
SHOW TABLES IN database
Use the INFORMATION_SCHEMA:
select table_schema, table_name from information_schema.tables;
Even better:
Show all tables in all databases (except internal mysql databases) in one SQL statement.
SELECT table_schema, table_name FROM information_schema.tables WHERE table_schema NOT IN ( 'information_schema', 'performance_schema', 'mysql' )