Mysql – load_file() producing null

MySQLmysql-5.5

I'm trying to read the content of /etc/passwd from mysql using the following query: select load_file("/etc/passwd");
However, I always seem to get NULL as the output.

mysql> select load_file("/etc/passwd");
+--------------------------+
| load_file("/etc/passwd") |
+--------------------------+
| NULL                     |
+--------------------------+
1 row in set (0.00 sec)

Is there a reason for this? the permission for the passwd file is the default permission.

Best Answer

If the SELECT works for you, then it will work for a hacker.

Think twice about breaking through this security barrier.