LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-18-2006, 03:06 PM   #1
akines
LQ Newbie
 
Registered: Apr 2006
Posts: 5

Rep: Reputation: 0
MySQL import database


Sorry for the silly question: how can I import a mysql database on another pc (not in the same lan)? Is it enough to copy all the folders?
Sorry again...

Byez!
 
Old 04-18-2006, 03:13 PM   #2
zener
Member
 
Registered: Jul 2005
Location: Greece
Distribution: Mandrake 10.1 , Ubuntu 5.1
Posts: 59

Rep: Reputation: 15
First you export the database from mySQL:

(terminal, not in mySQL)
mysqldump –u user_name –h localhost –p db_name > file_name.sql

Then you send it to the PC you want to and then you import it in that PC's mySQL database with the same command but using "<" instead
 
Old 04-18-2006, 03:13 PM   #3
zener
Member
 
Registered: Jul 2005
Location: Greece
Distribution: Mandrake 10.1 , Ubuntu 5.1
Posts: 59

Rep: Reputation: 15
First you export the database from mySQL:

(terminal, not in mySQL)
mysqldump u user_name h localhost p db_name > file_name.sql

Then you send it to the PC you want to and then you import it in that PC's mySQL database with the same command but using "<" instead
 
Old 04-19-2006, 01:14 AM   #4
akines
LQ Newbie
 
Registered: Apr 2006
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks, thanks very much.
Have a good day!!

Byez!
 
  


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
How to import a mysql database from backup WindowBreaker Slackware 6 03-16-2006 11:08 PM
Import Database Function Script Using Perl?? domquem Programming 3 01-13-2005 09:05 AM
Exporting MySQL error when trying to Import to another database. strez4prez Linux - Software 0 05-28-2004 11:43 AM
Editing text file for import to a spread/database Franklin Programming 7 03-31-2004 06:31 AM
Import records to MySQL Database from a shell script chrisk5527 Linux - General 12 03-24-2004 09:49 PM


All times are GMT -5. The time now is 02:16 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration