How can I restore a database dumped by mysqldump?


Suppose if we have dumped the whole database and now want to restore it then we can do it with the following example −

C:\mysql\bin>mysql -u root query < tutorials.sql

With the help of above query, we are restoring the dumped database named ‘tutorials’, in the file tutorials.sql, into other database named ‘query’. It means that the tables of database ‘tutorials’ would be restored in a database named ‘query’.

Updated on: 07-Feb-2020

173 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements