在windows下验一下这两个函数的区别
ubuntu下不成功,权限出错
mysql> select * from demo; +-------------+--------------+ | first_field | second_field | +-------------+--------------+ | ab | 2 | | abc | 3 | +-------------+--------------+ 2 rows in set (0.00 sec) mysql> select * from demo into outfile '/home/vigar/tst/aaa'; ERROR 1 (HY000): Can't create/write to file '/home/vigar/tst/aaa' (Errcode: 13)
mysql> create table a (cmd LONGBLOB); Query OK, 0 rows affected (0.14 sec) mysql> select * from a; Empty set (0.00 sec) mysql> insert into a (cmd) values (hex(load_file('/usr/bin/zip'))); Query OK, 1 row affected (0.00 sec) mysql> select * from a; +------+ | cmd | +------+ | NULL | +------+ 1 row in set (0.00 sec) mysql> select unhex(cmd) from a into dumpfile './aaa'; Query OK, 1 row affected (0.00 sec)
但没有找到aaa的具体位置