Chris and Richard:
I think you both hit the nail on the head.
After a few more hours of looking, reading, coding, and getting the
same "Access denied.." error, I think I see what's happening (besides
having a headache).
It appears that my code has the permission to do what it wants, but I
can't grant MySQL to do something other than accept, rearrange, and
show my stuff. If MySQL is instructed to write out a file then it
needs authorization (i.e., password and logon), a directory (i.e.,
path and permissions) and a non-existent file (i.e., i.e., can't over
write a file).
I followed the queries that Richard provided, but they all resulted
in "Access denied.."
I have never been more rejected since prom night.
Many thanks for your help -- I have to find another way around my problem.
tedd
On Tue, February 14, 2006 11:50 am, tedd wrote:
Hi gang:
I'm trying to dump a BLOB into a file for subsequent processing.
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.
Any ideas? I've busted my head on this for several hours now.
--- Chris said:
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
--- Richard said:
Not only would MySQL need access to that file, but the MySQL user you
login as, and the location from which it logs in (presumably
'localhost', but we don't know) can be constrained in MySQL itself to
deny access to altering the file-system.
To confirm this, execute the following queries:
$dbQuery = "describe mysql.user";
This will tell you which columns are what, if you are even allowed to
execute this query in the first place... It may ALSO give you:
Access denied.
$dbQuery = "select * from mysql.user where user = 'MySQLUSERNAME'";
Again, you may not have permission to execute that query either!
In other words, you have not yet reached the sublime joy of the file
system denying you access to itself -- You are still in the realm of
MySQL denying you access to the file system. :-)
--
Like Music?
http://l-i-e.com/artists.htm
--
--------------------------------------------------------------------------------
http://sperling.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php