Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I'm trying to load a non-regular file with MySQL:

select load_file ('/proc/cmdline')

It returns NULL

So I checked the documents here,

  1. the file is readable, because as mysql user, I can execute cat /proc/cmdline from the host
  2. the file didn't exceed size limit, because reading of /etc/passwd works, which is larger than that
  3. I didn't set secure_file_priv variable, show variables like 'secure_file_priv' shows an empty result

Any ideas?

load data local infile '/proc/cmdline' works

share|improve this question
    
What is a non-regular file? Minority? –  Phil Jan 20 at 1:48
    
@Phil Non regular files are like pipes, device files, sockets etc. from stat.h I think –  warl0ck Jan 20 at 2:21
    
Oh, right. I guess it won't work if it tries any kind of seeking.... –  Phil Jan 20 at 8:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.