views:

132

answers:

0

I'm running as mysql root user on my system.

I can select load_file('/etc/passwd'); no problem

But when I try to select load_file('/var/lib/mysql/mysql'); I get NULL as a result why? this file is good, I can cat it as root and view the mysql user data, why cant mysql load_file it? Its permissions are the default:

-rw-rw---- 1 mysql mysql    444 2009-08-04 19:08 user.MYD

It's owner is by default the user mysql and has read permission, so why doesn't mysql like to load_file it? Is mysql somehow blocking access to this file and if so how can I bypass that? Doing stuff like mysql/../mysql in the path doesn't work, and using hex encoding didn't work either?