Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

MySQL/Linux: Get Table Names from MySQL Dump

Posted on 2016-09-21
1
Medium Priority
?
99 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 80

Accepted Solution

by:
arnold earned 2000 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

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

Question has a verified solution.

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

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
In this article, I’ll talk about multi-threaded slave statistics printed in MySQL error log file.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month10 days, 13 hours left to enroll

885 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