Hi, I have a user for doing a select-to-outfile, and I've granted both the file privilege and also (just for the table in question) the select privilege to that user.
Trying it at the command-line gives me "Access denied..." which seems like it can't be the case having granted the correct privileges, no? I've pasted a sample transcript below, which starts by displaying exact OS version and MySQL version -- doing it all interactively while I'm debugging. Any ideas? -- Best regards, James. ______________________________________________________________________ [admin@gandalf testing]$ uname -a Linux gandalf.axoria.net 2.4.3-12 #1 Fri Jun 8 16:12:46 EDT 2001 i686 unknown [admin@gandalf testing]$ mysql --version mysql Ver 11.13 Distrib 3.23.36, for redhat-linux-gnu (i386) [admin@gandalf testing]$ mysql -uroot -p mysql Enter password: Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 10157 to server version: 3.23.36 Type 'help;' or '\h' for help. Type '\c' to clear the buffer mysql> show grants for fileuser@localhost; +---------------------------------------------------------------------------------------+ | Grants for fileuser@localhost | | +---------------------------------------------------------------------------------------+ | GRANT FILE ON *.* TO 'fileuser'@'localhost' IDENTIFIED BY PASSWORD |'9999999999999999' | | GRANT SELECT ON test2.product TO 'fileuser'@'localhost' | | +---------------------------------------------------------------------------------------+ 2 rows in set (0.00 sec) mysql> use test2 Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> SELECT partno, descrip, cost INTO OUTFILE '/tmp/jj' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' FROM product limit 10; Query OK, 10 rows affected (0.00 sec) mysql> exit Bye [admin@gandalf testing]$ mysql -ufileuser -p test2 Enter password: Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 10160 to server version: 3.23.36 Type 'help;' or '\h' for help. Type '\c' to clear the buffer mysql> SELECT partno, descrip, cost FROM product limit 10; +------------+----------------------------------+-------+ | partno | descrip | cost | +------------+----------------------------------+-------+ | Part no | Description | 0 | | 0197003/10 | MIDI TOWER (999K) CASE | -0 | | 0197003/11 | MIDI TOWER (999J) 3 BAY | -0 | | 1667006/1 | FLOPPY DISKS (10 pack) | 1.6 | | 2236026 | HP840 INK PRINTER(REP 710,720 | 66.96 | | 3015002 | BOOK SIZE PC | 120 | | 9999999 | (NONE) | 0.01 | | 99P41500 | P4 SYSTEM | -0 | | ACCADD001 | 9WAY D F - 25WAY D F ADAPTER | 1.39 | | ACCBAT | COMPUTER MOTHERBD BATTERY CR2032 | 2.72 | +------------+----------------------------------+-------+ 10 rows in set (0.00 sec) mysql> SELECT partno, descrip, cost INTO OUTFILE '/tmp/jj' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' FROM product limit 10; ERROR 1044: Access denied for user: 'fileuser@localhost' to database 'test2' mysql> --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php