How to get mysql Database dump and restore database

Hello,

1.You can use following commands for taking mysql dump in .sql format
go to /var/lib/mysql

search for the database whose dump you want.

ls -l | grep database_name

mysqldump database_name > database.sql

2. If the mysql dumpis available and you want to restore that you need to use following command for that

cd /var/lib/mysql

check the database name where you want to restore the mysqldump
ls -l | grep database_name

mysql database_name < database.sql

Like this post ?

Share on your Social Networking Profile ( Facebook, Twitter & Google+ ) and get a flat 10% Recurring discount on our VPS Hosting and Dedicated Servers.

Email us the shared link at : sales@eukhost.com or speak to our live chat operator now, by clicking on the “Live Chat” Scroller on the left-hand side of this page and we will provide you with the discount Coupon right away!

This entry was posted in Business Website Hosting Solutions, cPanel - WHM Resellers in UK, Domain Registration and Hosting, Exchange and Zimbra Email Hosting, Industry Knowledge Hub, Latest Techs and Updates, Other Hosting Services and Related, Tutorials, Web Hosting Articles, Web Hosting HOWTOs. Bookmark the permalink.

One Response to How to get mysql Database dump and restore database

  1. Harry says:

    When restoring your data back you should create an empty database, or at least a database which does not contain any tables of the same name as those within your dump database.

Leave a Reply