MySQL/Linux: Get Table Names from MySQL Dump

skij
skij used Ask the Experts™
on
I have a MySQL dump file named: "xyz.sql" that is about 10 gigabytes.  Is there a way to get the names of the tables from the .sql file from the Linux command line without having to download the file or without needing to create a new database?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Distinguished Expert 2017
Commented:
grep -I 'create table' dump_file |awk ' { print 3$ } '
If you have access to MySQL, run show tables from databasename.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start Today