Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to backup and restore mysql in Win

2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article introduces you how to backup and restore mysql in Win, the content is very detailed, interested friends can refer to, hope to be helpful to you.

Suppose mysql is installed on c: disk, the user name of mysql is root, the password is 123456, the database name is database_name, the backup database is stored under the root directory of d: disk, and the backup database name is backup20070713.sql (20070713.sql is the backup date)

Back up the database:

Dump-uroot-p123456 database_name > d:/backup20070713.sql

Restore the database:

Delete the original database, establish the database, and import the backup database.

Mysqladmin-uroot-p123456 drop database_name

Mysqladmin-uroot-p123456 create database_name

Mysql-uroot-p123456 database_name

Note: before importing the backup database, database_name, if not, needs to be created; and it is the same as the database name in backup20070713.sql to import.

Note: environment Windows command line

On how to backup and restore mysql in Win to share here, I hope the above content can be of some help to you, you can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report