Yes, I used the proper name for "username" on the GRANT command..

It was actually 

mysql> GRANT FILE ON database.* TO [EMAIL PROTECTED] IDENTIFIED BY
'password';
Query OK, 0 rows affected (0.00 sec)

Mysql> 

Jeff McKeon
IT Manager
Telaurus Communications LLC
[EMAIL PROTECTED]
(973) 889-8990 ex 209 

***The information contained in this communication is confidential. It
is intended only for the sole use of the recipient named above and may
be legally privileged. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this communication, or any of its contents or attachments,
is expressly prohibited. If you have received this communication in
error, please re-send it to the sender and delete the original message,
and any copy of it, from your computer system. Thank You.***



-----Original Message-----
From: Jeff McKeon 
Sent: Thursday, July 03, 2003 10:25 AM
To: Mysql List
Subject: RE: CSV Formated output


Ok, so SELECT INTO OUTFILE and TERMINATED BY will work except for one
thing....

They require GRANT FILE access for the user to work and I can't seem to
add that priv to my user...

---snip---
mysql> GRANT FILE ON database.* TO [EMAIL PROTECTED] IDENTIFIED BY
'password';
Query OK, 0 rows affected (0.00 sec)

Mysql> 
---snip---

Is the command I'm using and it seems to go ok but when I do a;

SHOW GRANTS FOR [EMAIL PROTECTED];

All I see is 

---snip---
| GRANT USAGE ON *.* TO 'username'@'localhost' IDENTIFIED BY PASSWORD
'5f2eb14423b3bfc1' |
| GRANT SELECT ON `database`.* TO 'username'@'localhost'
---snip---
Shouldn't I see 

| GRANT FILE ON `database`.* TO 'username'@'localhost'

??

I've then tried the SELECT INTO OUTFILE query:

SELECT Name, ID
INTO OUTFILE "/home/MIS/shiplist.csv"
FIELDS TERMINATED BY ','
FROM RemoteStation
WHERE Name LIKE "zz%"

 an get the following...

ERROR 1045 at line 1: Access denied for user: '[EMAIL PROTECTED]' (Using
password: YES)

If I do the same query however without the "INTO OUTFILE" then it runs
fine.

What have I screwed up now?

Jeff McKeon
IT Manager
Telaurus Communications LLC
[EMAIL PROTECTED]
(973) 889-8990 ex 209 

***The information contained in this communication is confidential. It
is intended only for the sole use of the recipient named above and may
be legally privileged. If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this communication, or any of its contents or attachments,
is expressly prohibited. If you have received this communication in
error, please re-send it to the sender and delete the original message,
and any copy of it, from your computer system. Thank You.***



-----Original Message-----
From: Andy Eastham [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 03, 2003 9:25 AM
To: Mysql List
Subject: RE: CSV Formated output


Jeff,

By "manual", I mean http://www.mysql.com/documentation/index.html

It's worth downloading the "all in one HTML file" version so you can
search through the whole document for things like "SELECT INTO OUTFILE"
or "FIELDS SEPARATED BY"

All the best,

Andy

> -----Original Message-----
> From: Jeff McKeon [mailto:[EMAIL PROTECTED]
> Sent: 03 July 2003 13:50
> To: Andy Eastham; Mysql List
> Subject: RE: CSV Formated output
>
>
> Thanks Andy, that will do!
>
> I don't have a manual, using the open source MySQL.  I do have a book
> (New Riders "MySQL") but was looking for "deliminated" not 
> "terminated." Found it now.  Thanks again for the help.
>
> Jeff McKeon
> IT Manager
> Telaurus Communications LLC
> [EMAIL PROTECTED]
> (973) 889-8990 ex 209
>
> ***The information contained in this communication is confidential. It

> is intended only for the sole use of the recipient named above and may

> be legally privileged. If the reader of this message is not the
> intended recipient, you are hereby notified that any dissemination, 
> distribution or copying of this communication, or any of its contents 
> or attachments, is expressly prohibited. If you have received this 
> communication in error, please re-send it to the sender and delete the

> original message, and any copy of it, from your computer system. Thank

> You.***
>
>
>
> -----Original Message-----
> From: Andy Eastham [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 03, 2003 8:06 AM
> To: Mysql List
> Subject: RE: CSV Formated output
>
>
> Jeff,
>
> Use SELECT INTO OUTFILE and FIELDS TERMINATED BY ','
>
> See the manual for more info.
>
> Andy
>
> > -----Original Message-----
> > From: Jeff McKeon [mailto:[EMAIL PROTECTED]
> > Sent: 03 July 2003 12:38
> > To: [EMAIL PROTECTED]
> > Subject: CSV Formated output
> >
> >
> > Is there a way to output the results of a select query into a CSV or

> > Comma Deliminated format?
> >
> > Thanks,
> >
> > Jeff McKeon
> > IT Manager
> > Telaurus Communications LLC
> > [EMAIL PROTECTED]
> > (973) 889-8990 ex 209
> >
> > ***The information contained in this communication is confidential.
> > It
>
> > is intended only for the sole use of the recipient named above and
> > may
>
> > be legally privileged. If the reader of this message is not the
> > intended recipient, you are hereby notified that any dissemination, 
> > distribution or copying of this communication, or any of its 
> > contents or attachments, is expressly prohibited. If you have 
> > received this communication in error, please re-send it to the 
> > sender and delete the
>
> > original message, and any copy of it, from your computer system.
> > Thank
>
> > You.***
> >
> >
> > --
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:
> > http://lists.mysql.com/[EMAIL PROTECTED]
> >
> >
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/[EMAIL PROTECTED]
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to