Mysql数据导入导出命令

many of us may only need to use data reduction. data backup is to make the key data in DB.
it may provided by one of us.

----------------------------
Data Backup from DB(数据备份) :
---not need to do this if you don't want to backup you data in db.
---it will get two files right after this, "averportaldata.sql" and "resource" folder.

1,open command line.input the command "cmd".
2, input the follow command.
   mysqldump -u root -p averportal > c:\averportaldata.sql --hex-blob
3, find the file averportaldata.sql in the path "c:\averportaldata.sql".
4, find the folder "resource" in your workspace of your eclipse, like "C:\Documents and    Settings\walter\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0   \wtpwebapps\AVerPortal\DATA\resource"

-----------------------------
Data Reduction to DB(数据还原)
---here provides the key data for testing.
---two resources need: the sql files "averportaldata.sql" and the folder "resource"

1,copy your sql file "averportaldata.sql"  to the path "c:\". run the command below.
   mysql -u root -p averportal < c:\averportaldata.sql
2, find workspace of your eclipse.Something like this: "C:\Documents and    Settings\walter\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0   \wtpwebapps\AVerPortal\DATA". copy the folder here.

你可能感兴趣的:(eclipse,sql,c,mysql,SQL Server)