---
title: "Import/export data in Mysql"
author: "aaron_ch"
date: "2010-08-01T20:28:12Z"
tags: []
categories: ["数据库"]
slug: "import-export-data-in-mysql"
draft: false
lastmod: "2010-08-02T14:55:14Z"
id: 726608
url: "https://aaron-ch.iteye.com/blog/726608"
---

Import the backup database file to Mysql,use below command.

1.use cmd command to locate the mysql bin directory:

e.g., **C:\\Program Files\\MySQL\\bin**

2. use the command to import data to database: 

**mysql -uroot -p123 sfproject&lt;d:\\php\\maxtor\_bak1**

Note: sfproject is the database name. and d:\\php\\maxtor\_bak1 is the backup file.

 

 

**C:\\Program Files\\MySQL\\bin&gt;mysql -uroot -p123 sfproject&lt;d:\\php\\maxtor\_bak1**

**backup db**

mysqldump -uroot -p123 Maxtor&gt;D:\\php\\maxtor\_bk