1.“开始”-》cmd-》cd mysql目录的bin目录的详细路径
2.进入mysql:输入命令---- mysql -h localhost -u root -p 回车
3.此时会叫你输入密码,输入密码回车,没密码的直接回车
4.已进入mysql:
5.然后使用source命令,后面参数为脚本文件(如这里用到的.sql)[事先在数据库中建好与导入文件中的数据库名称,也可不建]
mysql>source c:\web3guo.sql
导出整个数据库
mysqldump -u 用户名 -p 数据库名 > 导出的文件名
导出一个表
mysqldump -u 用户名 -p 数据库名 表名> 导出的文件名