天天看点

mysql单表转移数据语句

导出:mysql -h192.168.0.13 -uroot -p --local-infile=1 -D iapppay -e "select * from pay_translog where substr(transtime,1,7) = '2013-11'" > ./pay_translog.txt

导入:/usr/local/mysqlbalance/bin/mysql -uroot -p -P3308 --local-infile=1 -e "LOAD DATA local INFILE '/root/pay_translog.txt'  into table balance.pay_translog character set utf8 fields terminated by '\t' ;"

     本文转自aaron428 51CTO博客,原文链接:http://blog.51cto.com/aaronsa/1741500,如需转载请自行联系原作者

继续阅读