mysql into outfile 总结
备份语法:select * from表名 where 条件into outfile '/tmp/表名.txt'; #注意保存位置/tmp的权限;
#注意备份文件的格式;
恢复语法:
load data infile '表名.txt' intotable 表名 ; #注意恢复时备份文件的位置要存放在mysql 数据库 data 库目录下;
范例:根据时间字段检索数据:
备份outfile:
select * from PageView where ActionTime>='2015-01-01 00:00' and
ActionTime
页:
[1]