To find out which database is currently selected, use the DATABASE() function:

SELECT DATABASE();

To find out what tables the default database contains (for example, when you are not sure about the name of a table), use this command:

SHOW TABLES;

If you want to find out about the structure of a table, the DESCRIBE statement is useful; it displays information about each of a table's columns:

DESCRIBE pet;