Home > Database > Mysql Tutorial > body text

How to restore multiple databases or all databases dumped by mysqldump?

PHPz
Release: 2023-08-25 13:41:06
forward
870 people have browsed it

如何恢复 mysqldump 转储的多个数据库或所有数据库?

Suppose if we dumped multiple databases or all databases and now want to restore it then we can do it using the following example-

C:\mysql\bin>mysql -u root < tutorials_query1.sql
Copy after login

With the help of the above query, we are restoring multiple databases named "tutorials" and "query1" dumped in a file named "tutorials_query1.sql". In this case we don't need to write the name of the database.

Similarly, with the help of the following query, we can restore all the databases dumped by mysqldump -

C:\mysql\bin>mysql -u root < alldatabases.sql
Copy after login

With the help of the above query, we are restoring all the databases dumped, which were dumped in in a file named "alldatabases.sql". In this case we don't need to write the name of the database.

The above is the detailed content of How to restore multiple databases or all databases dumped by mysqldump?. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!