Solved

MySQL/Linux: Get Table Names from MySQL Dump

Posted on 2016-09-21
1
66 Views
Last Modified: 2016-09-25
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?
0
Comment
Question by:skij
1 Comment
 
LVL 78

Accepted Solution

by:
arnold earned 500 total points
ID: 41809732
grep -I 'create table' dump_file |awk ' { print 3$ } '
If you have access to MySQL, run show tables from databasename.
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question