mysql command line to export / import database

Exporting a library
using dos into the bin directory under mysql server directory
such as My Files is Program (x86) \ MySQL \ MySQL Server 5.6 \ bin
(dos open the default user directory is available cd ... fall back to c drive, I under the mysql server directory so the user does not want to roll back)

Then enter -u root -p dbName mysqldump> sqlFilePath \ news.sql
dbName: to export the database name
sqlFilePath: news.sql Export to file under this path in (this file is new .txt file renaming it)
asked to enter password, you can enter a carriage return:
Here Insert Picture Description

Pay attention to the format, which must have some space, there is the export file path is best to write about, otherwise there will be denied access to such an error

Here Insert Picture Description

Import:
also the first to enter the Program Files (x86) \ MySQL \ MySQL Server 5.6 \ bin (mysql.exe the folder)
Here Insert Picture Description

You can refer to this blog:
https://blog.csdn.net/amy1213272092/article/details/80802601

Published 54 original articles · won praise 6 · views 4907

Guess you like

Origin blog.csdn.net/jiruqianlong123/article/details/90747988