LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-23-2014, 09:12 PM   #1
depam
Member
 
Registered: Sep 2005
Posts: 861

Rep: Reputation: 30
MySQL dump query from table and restore


Any easy way of dumping a query from a database specific table and restore it on another DB?

I googled around and can do mysql -uuname -ppass -e "SELECT * FROM tablename WHERE column=y" > output.sql

I don't know how to restore this on table on other DB

Tried mysql -uuname -ppass dbname.tablename < output.sql but not working
 
Old 06-24-2014, 01:21 AM   #2
sag47
Senior Member
 
Registered: Sep 2009
Location: Raleigh, NC
Distribution: Ubuntu, PopOS, Raspbian
Posts: 1,899
Blog Entries: 36

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Why don't you use mysqldump? It's a command to dump databases for backup (and later restoration).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL dump restore in a remote machine with port 3307 Iyyappan Linux - Server 8 09-10-2012 02:17 AM
Mysql DB dump restore failed moyorakkhi Linux - Newbie 3 03-27-2012 06:36 PM
Restore MySQL Dump File But I want it to restore with different names? helptonewbie Linux - Newbie 5 07-08-2009 05:09 AM
php/mysql: cross-table query? CoderMan Programming 3 06-09-2009 12:54 AM
Trying to restore mysql dump, error 1062: Duplicate entry mackdav Linux - Software 1 04-25-2006 03:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration