How can I restore a database dumped by mysqldump?

MySQLMySQLi Database

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’.

Published on 20-Feb-2018 14:57:16