时间:2021-07-01 10:21:17 帮助过:5人阅读
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