LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-06-2009, 02:19 AM   #1
umwai
Member
 
Registered: May 2008
Location: Sri Lanka
Distribution: Ubuntu
Posts: 57
Blog Entries: 1

Rep: Reputation: 16
Unhappy How to import and export database


How to import and export a mysql database using ssh.
 
Old 03-06-2009, 03:00 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,970

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
To export a database use:
Code:
mysqldump -u root -p db-name > backup.sql
To import a database:
Code:
mysql -u root -p db-name < backup.sql
 
  


Reply

Tags
mysql, ssh


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
import and export command mrbutabara Linux - Newbie 1 02-17-2009 10:21 AM
how to export/import users/passwords ? dlugasx Linux - Server 3 02-02-2009 07:33 AM
Export-Import with pipe files asi Linux - Software 2 06-05-2007 12:25 PM
Import/Export Thunderbird filters xri Linux - Software 2 01-07-2007 09:31 PM
Accessing import and export symbols ? unclesam Linux - Newbie 2 01-11-2006 09:14 AM


All times are GMT -5. The time now is 11:11 PM.

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