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' ;"


你可能感兴趣的:(mysql,数据库)