mysql -u app -p appdb -e 'SHOW TABLES;'

Category: Databases & SQL

mysql -u app -p appdb -e 'SHOW TABLES;'

List tables in a database

Shows the tables in appdb without entering the interactive shell. Related: -e 'DESCRIBE users;' for columns. The database name comes before -e.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.