LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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, 01: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, 02:00 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,158
Blog Entries: 1

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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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