mysql(root@localhost:tiger_erp)>select * from QQLH_CODE into outfile "/home/wy/mysql/QQLH_CODE_252.sql" -> ; ERROR 1 (HY000): Can‘t create/write to file ‘/home/wy/mysql/QQLH_CODE_252.sql‘ (Errcode: 13 - Permission denied) mysql(root@localhost:tiger_erp)>select * from QQLH_CODE into outfile "/home/mysql/QQLH_CODE_252.sql";
2.巧用pager重定向stdout
mysql(root@localhost:tiger_erp)>pager cat >/home/wy/mysql/QQLH_CODE.sql; PAGER set to ‘cat >/home/wy/mysql/QQLH_CODE.sql‘ mysql(root@localhost:tiger_erp)>select * from QQLH_CODE; 6250 rows in set (0.04 sec) mysql(root@localhost:tiger_erp)>nopager;