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

MySQL database command line import and export backup method

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the command line import and export backup method of MySQL database, hoping to supplement and update some knowledge, if you have other questions to understand, you can continue to follow my updated article in the industry information.

Backup

1 start menu | run | cmd |

2 MySQL command line export database: enter the bin folder under the MySQL directory: the directory to the bin folder in cd MySQL as I entered the command line: cd D:\ mysql-5.6.24-win32\ bin

(or add the directory directly to the environment variable path of windows)

3 Export database: mysqldump-u user name-p database name > exported file name such as the command line I entered: mysqldump-u root-p yyp > yyp.sql (after entering, it will let you enter the password to enter MySQL) (if you export a single table, enter the table name after the database name)

4 you will see that the file yyp.sql is automatically generated to the bin file under the command line to import the database:

Reduction

1 enter "mysql >", enter the command "show databases;", enter, and see what databases you have.

2 set up the database you want to restore, type "create database yyq;", and enter enter

3 switch to the newly established database, type "use voice;", and enter enter

4 import data, enter "source yyp.sql;", enter, start the import, reappear "mysql >" and restore successfully without prompting an error.

5 Import succeeded

Read the above about MySQL database command line import and export backup method, I hope it can bring some help to everyone in practical application. Due to the limited space in this article, it is inevitable that there will be deficiencies and need to be supplemented. If you need more professional answers, you can contact us on the official website for 24-hour pre-sales and after-sales to help you answer questions at any time.

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