Re: Strange response to MySQL query

From: Date: Tue, 14 Feb 2006 23:02:45 +0000
Subject: Re: Strange response to MySQL query
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-230393@lists.php.net to get a copy of this message
To do this I'm using the query statements: $dbQuery = "SELECT image "; $dbQuery .= "FROM flowers "; $dbQuery .= "WHERE image_Id=$pic_id "; $dbQuery .= "INTO DUMPFILE '/tmp/test.jpg' "; But, it generates an "Access denied.." error. However, if I comment-out the last line, namely "INTO DUMPFILE" statement, then the code accesses the dB (i.e., no access problems). In thinking it might be permission related, I set permissions for the tmp folder and file to 777, but that didn't help.
You might not have access to use 'into dumpfile' through mysql. http://dev.mysql.com/doc/refman/5.1/en/grant.html says you need "FILE" permission: FILE Enables use of SELECT ... INTO OUTFILE and LOAD DATA INFILE

« previous php.general (#230393) next »