mysql> select * from sweet_vip_users limit 11 > temp.txt -> ; ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '> temp.txt' at line 1
mysql> select * from sweet_vip_users limit 11 >> temp0524.txt -> ; ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '>> temp0524.txt' at line 1
不好意思,我说错了 这样 select * from tablename into outfile "/home/mydir/test.txt"
SELECT * FROM customer INTO OUTFILE '/home/mydir/a.txt';注意要对/home/mydir/授予写权限,如:chmod 777 /home/mydir
-> ;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '> temp.txt' at line 1
-> ;
ERROR 1064: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '>> temp0524.txt' at line 1
这样
select * from tablename into outfile "/home/mydir/test.txt"