可以使用mysqldump中的where选项,与oracle的expdp功能类似;
比如,需要导出某个表最近两天的数据
[justin@localhost ~]$ mysqldump -u root -p justin justin_logs --where="datediff(curdate(),create_time) <= 2" > justin_logs.sql
Enter password:
比如,需要导出某个表最近两天的数据
[justin@localhost ~]$ mysqldump -u root -p justin justin_logs --where="datediff(curdate(),create_time) <= 2" > justin_logs.sql
Enter password:
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15480802/viewspace-708282/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/15480802/viewspace-708282/