导出 :
To export MySQL database, open putty on Windows or Terminal in either MAC or Linux OS, Go to the directory where you want this file to be stored using following command,
cd /home/myfiles/
Then use below command to export a databse,
mysqldump --database --user=root --password your_db_name > export_into_db.sql
You will be asked about root password after this command. For windows users who are executing this on their localhost, your password is empty if you ave not set it up. Please direct enter without typing anything.
Now you will get a file named export_into_db.sql in the same directory as you are.
导入 :
To import a .sql file you need to log into your mysql DBMS first.
Typein : mysql -u root -p and enter. It will ask you your root user’s password.
First select the database and then use following command to import the file,
mysql>use my_new_db; mysql>source /home/myfiles/export_into_db.sql
Press enter and your import will start.
Enjoy…
Please feel free to post comments if you have any issues.
原文:http://www.ultechspot.com/mysql/how-export-and-import-mysql-database-using-command-line-interface
转自:命令行导出和导入数据库 How to export and import MySQL database using command line Interface
相关推荐
举例为大家介绍如何运用命令行实现MySQL导出导入数据库 一、命令行导出数据库 1.进入MySQL目录下的bin文件夹:cd MySQL中到bin文件夹的目录 如:cd C:\Program Files\MySQL\MySQL Server 4.1\bin (或者直接将...
命令行导入导出Oracle数据库操作,操作简单,比用工具而且快
mysql命令行下导出,导入
主要介绍了LNMP下使用命令行导出导入MySQL数据库的方法,需要的朋友可以参考下
MySQL命令行导入导出数据库步骤操作 一、利用cmd操作MySQL数据库,导出sql文件 二、利用sql文件,通过cmd使用MySQL命令建立数据库,恢复数据
Mysql命令行导入数据库: 1,将要导入的.sql文件移至bin文件下,这样的路径比较方便 2,同上面导出的第1步 3,进入MySQL:mysql -u 用户名 -p 如我输入的命令行:mysql -u root -p (输入同样后会让你输入MySQL的密码...
主要介绍了MySQL命令行导出导入数据库实例详解的相关资料,需要的朋友可以参考下
MySQL命令行导出数据库: 1,进入MySQL目录下的bin文件夹:cd MySQL中到bin文件夹的目录 如我输入的命令行:cd C:Program FilesMySQLMySQL Server 4.1in (或者直接将windows的环境变量path中添加该目录) ...
mysql导出乱码 可以使用 导入导出命令 指定默认字符集,使导出的字符为中文
bcp是微软SQLServer数据库系统的命令行工具,用于进行大数据量的导入导出,该工具简单实用、效率极高,本文总结了bcp命令操作的各种设置开关功能含义和使用方法,可以为需要的用户提供有益帮助。
在不同操作系统或MySQL版本情况下,直接拷贝文件的方法可能会有不兼容的情况发生。所以一般推荐用SQL脚本形式导入。
mysql数据库导入,导出方法,mysql,数据库,导出,导入
MySql和Oracle数据库本地或远程备份导出和导入(JAVA版)工具类,亲测可用!! 注:Mysql导出和导入的时候需要配置 mysqldump和mysql命令的全路径!!!
mysql数据库导入导出命令mysql数据库导入导出命令
将MySQL数据库中的导出为Word格式,自动生成数据库说明文档。 里面有操作说明,通过系统的ODBC连接数据库,需要现在ODBC中添加连接信息,word中需要启动宏,运行程序,按照模板导出
本项目包含一个带样式的小实例,页面可以直接导入数据,导入的数据存入mysql数据库,也可以导出excel,导出excel文件位于downloads目录下, 需要将较长的样本数据从 Excel 文件导入到 MYSQL 数据库,此项目包含一个 ...