we have many questions about load_file() failures on stackoverflow already. alas, my wrinkle is different: I have full sudo control and privileges. how can I track what is going wrong?
background: on ubuntu 14.04 with mysql 5.5.46, I started a mysqld --verbose
, then I turned myself into an su on another terminal, and did
# mysql -u me
use mydb;
create table aha (fc blob);
insert into aha values(load_file('/tmp/test.txt'));
which creates the seemingly inevitable NULL in the table. I only tried about 200 different variants on accomplishing this.
the failure is one issue. (an expert might take one look and see it. I strotz with privileges. I am su. I have given myself all privileges possible. the /tmp/test.txt file is world-readable. the mysql version is not that old.)
alas, I have a different issue: I have no idea how to go about tracing the problem. is the source of the failure the inability to slurp the file, the privileges, etc.? the /var/log/mysql/*log
provides no useful info, despite the --verbose flag.
help appreciated.