Connecting Tech Pros Worldwide Forums | Help | Site Map

Reading Dump

Member
 
Join Date: Feb 2008
Posts: 65
#1: Apr 3 '08
Hi friends,

can anyone tell me how can I read dump values from one database to another?
I can't understand the dump concept properly. can anybody explain it?
what command we have to use to dump tables?

I have to dump one large table from one database to another.
what is the command for it?
Please help me out.

Thanx n Regards
Yas...

debasisdas's Avatar
Moderator
 
Join Date: Dec 2006
Location: Bangalore ,India
Posts: 7,511
#2: Apr 3 '08

re: Reading Dump


mysqldump is a tool to import and export MySQL databases.

It can be used to back up a database or to move database information from one server to another.

To export a database.

# mysqldump -u username -ppassword database_name > FILE.sql

Replace username, password and database_name with your MySQL username, password and database name.

Import is used to restore data from a backup or to import from another MySQL server.

Start by uploading the FILE.sql file to the server where you will be running this command.

# mysql -u username -ppassword database_name < FILE.sql
ronverdonk's Avatar
Moderator
 
Join Date: Jul 2006
Location: The Netherlands
Posts: 4,139
#3: Apr 3 '08

re: Reading Dump


When you can use phpMyAdmin it is even simpler. Just go to the database panel and click 'Export' tab at the top.

It will prompt you for the names of the tables (or the entire database), and the extra options to generate like 'DROP' and 'IFEXISTS', whether you want to write the sql dump to screen, where you can copy and paste it, or write the dump to a file.

In the latter case, you can then transmit that file to the new database server and do exactly the opposite, i.e. go to the db panel, hit the 'Import' button, and specify the name of the dump file you made previously and run it.

Ronald
Member
 
Join Date: Feb 2008
Posts: 65
#4: Apr 7 '08

re: Reading Dump


Thanks a lot.... for ur valuable replies......
I'm amazing, how easy these things are......


Thanx n Regards
Yas...
ronverdonk's Avatar
Moderator
 
Join Date: Jul 2006
Location: The Netherlands
Posts: 4,139
#5: Apr 7 '08

re: Reading Dump


Quote:

Originally Posted by yasmine

Thanks a lot.... for ur valuable replies......
I'm amazing, how easy these things are......

Thanx n Regards
Yas...

You are welcome yasmine. See my signature for an explanation of why sometimes things look difficult.

Ronald
Reply


Similar MySQL Database bytes