MySQL DBA Training - How to restore single database from complete MySQL database dump

Scenario:

You are working as MySQL DBA,  You are provided a complete MySQL or MariaDB database dump but you need to restore only one database out of entire database dump. What steps you will take to restore single database from complete MySQL database Dump.

Solution:

To create the single database dump file you can use below command.

mysqldump --user=UserName --password=PasswordforUser --all-databases >/DestinationDirectory/BackupFileName.sql

To Restore single database from complete backup dump, you can use below command.
mysql --user=[UserName] --password=[Password] --one-database destdbname < alldatabases.sql

You need to create the empty database first before you run the restore database command. Let's say we need to restore abc database, then you can use below command.

mysql --user=UserName --password=ProvidePassword --one-database abc < /mysqlbackup/alldatabases_backupfile.sql
MySQL DBA Training - Restore single database from Complete mysqldump file

22 comments:

  1. Great Article. Thank you for sharing! Really an awesome post for every one.

    IEEE Final Year projects Project Centers in Chennai are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation. For experts, it's an alternate ball game through and through. Smaller than expected IEEE Final Year project centers ground for all fragments of CSE & IT engineers hoping to assemble. Final Year Project Domains for IT It gives you tips and rules that is progressively critical to consider while choosing any final year project point.

    Spring Framework has already made serious inroads as an integrated technology stack for building user-facing applications. Spring Framework Corporate TRaining the authors explore the idea of using Java in Big Data platforms.
    Specifically, Spring Framework provides various tasks are geared around preparing data for further analysis and visualization. Spring Training in Chennai

    ReplyDelete
  2. Thanks for an interesting blog. What else may I get that sort of info written in such a perfect approach? I have an undertaking that I am just now operating on, and I have been on the lookout for such info. 어린이 화상영어

    ReplyDelete
  3. Super site! I am Loving it!! Will return once more, Im taking your food additionally, Thanks. training for a german shepherd

    ReplyDelete
  4. Hi buddies, it is great written piece entirely defined, continue the good work constantly.

    ReplyDelete
  5. Mmm.. good to be here in your article or post, whatever, I think I should also work hard for my own website like I see some good and updated working in your site. TECH

    ReplyDelete
  6. Really, I appreciate your blog submission site List. Thank you for sharing your idea
    Best SEO Expert in Coimbatore

    ReplyDelete
  7. For individuals who are new to video advertising, attempt to keep your recordings short. Around 30-45, seconds is a decent length to begin. VIDEO PRODUKCIJA

    ReplyDelete
  8. Web development is programming, and a knowledge of the web and business. Do you need to know anything? It depends on whether the course is being taught to people who are programmers or beginners.
    For more info: lapisstag.com

    ReplyDelete
  9. This is really a nice and informative, containing all information and also has a great impact on the new technology. Check it out here:اخبار التقنية اليوم

    ReplyDelete
  10. This is really a nice and informative, containing all information and also has a great impact on the new technology. Check it out here:xem bóng đá trực tuyến

    ReplyDelete