码迷,mamicode.com
首页 > 其他好文 > 详细

导入文件, 导出文件

时间:2015-09-11 23:24:35      阅读:175      评论:0      收藏:0      [点我收藏+]

标签:

导入文件, 导出文件

导入文件, 导出文件

? mysqldump -u xxx -pxxx database_name > file
? mysqldump -u xxx -pxxx database_name table_name1, table_name2 > file

out to file

select * into outfile ‘file‘
fields terminated by ‘\t‘ enclosed by ‘|‘
lines terminated by ‘\n‘ started by ‘start‘
from table_name;

in from file

load data infile ‘file‘
fields terminated by ‘\t‘ enclosed by ‘|‘
lines terminated by ‘\n‘ started by ‘start‘
into xxx
mysql> source file.sql

导入文件, 导出文件

标签:

原文地址:http://www.cnblogs.com/sunznx/p/4802270.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!