select ...into outfile语句。
select * from rank into outfile "/home/a.txt"
mysql -uroot -proot -P3310 -h10.1.2.3 dbname -e "select * from rank" > /home/a.txt
mysql>tee /home/a.txt mysql>select * from rank; mysql>exit
mysql -uroot -p dbname -e "select * from user_role_new ; show profile cpu , block io for query 15" > ~/aa.txt
版权声明:本文为博主原创文章,未经博主允许不得转载。
原文地址:http://blog.csdn.net/u012685794/article/details/47667523