LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 02-11-2008, 05:44 PM   #1
Peter Shepard
Member
 
Registered: Apr 2005
Posts: 96

Rep: Reputation: 15
copy one mysql database into another


I have an old filesystem on an external hd that I was using as a mysl database I have since installed a new distro and would like to reload my old mysql files into a new mysql database?

Any ideas?

TIA
 
Old 02-11-2008, 06:29 PM   #2
BrianK
Senior Member
 
Registered: Mar 2002
Location: Los Angeles, CA
Distribution: Debian, Ubuntu
Posts: 1,334

Rep: Reputation: 51
Quote:
Originally Posted by Peter Shepard View Post
I have an old filesystem on an external hd that I was using as a mysl database I have since installed a new distro and would like to reload my old mysql files into a new mysql database?

Any ideas?

TIA
if your "old mysql files" were generated by mysqldump, it's simply a matter of creating a database with the same name on the new machine, then:

mysql -uuser -ppass db_bname < saved_file.sql

If your "old mysql files" are the actual filesystem in your mysql directory, then you can simply copy the directories you want (databases you want) into the mysql directory "var" on the new machine.
 
  


Reply



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
How to overcome the RPM "mysql-5.0.27-1.fc6" conflict with mysql database starting kamakshiganesh Linux - General 0 10-22-2007 07:07 AM
mysql - can't access mysql database as root yogaboy Linux - Software 5 12-28-2006 06:58 AM
How do I make a copy of mysql database intale(located) on linux server jenny1668 Linux - Newbie 1 10-02-2006 07:02 AM
Writing an app that uses a mysql database without installing mysql server? QtCoder Programming 4 08-09-2004 02:43 PM
MYSQL help - mysql database missing eloviyandhi Linux - Software 1 03-20-2004 09:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 01:56 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