The user needs to file privilege" to "load data infile" which is a global
privilege, not database bound

I assume you created hydro like this:

Grant all on hydro.* to [EMAIL PROTECTED] ...

If you do a:

>use mysql;
>select * from db;

You will see that the file priv is not a part of that permission set.


You have to assign the file priv to hydro globally

Olaf

On 10/1/08 2:30 PM, "Reyna.Sabina" <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> I am using MySQL 5.0.45, for redhat-linux-gnu (x86_64).
> 
> I created a new database called HYDRO (user: admin). I created a new user
> called 'hydro' in the 'localhost' ([EMAIL PROTECTED]) without a password.
> User 'hydro' has given all provileges except the ' Grant_priv'.
> 
> As user 'hydro', I can do the following:
>    - create the database
>    - create tables
>    - insert
>    - drop table
>    - drop database
> 
> When trying to use 'LOAD' from inside MySql session and from  the
> command line, I can only get it to work if I use the "admin" user.
> If I use the "hydro", it doesn't work due to insufficient privileges.
> 
> From the command line
> ---------------------
> linux>cat load_junk.sql
> USE HYDRO;
> LOAD DATA INFILE 'junk.dat' INTO TABLE junk
> FIELDS TERMINATED by '|'
> LINES TERMINATED BY '\n';
> 
> linux>cat load_junk.sql
> 1|1.0|10.0|
> 2|2.0|20.0|
> 3|3.0|30.0|
> 
> linux>mysql < load_junk.sql
> ERROR 1045 (28000) at line 3: Access denied for user 'hydro'@'localhost'
> (using password: NO)
> 
> From a MySQL Session
> ---------------------
> linux>mysql
> mysql>USE HYDRO;
> mysq>LOAD DATA INFILE 'junk.dat' INTO TABLE junk
>      FIELDS TERMINATED by '|' LINES TERMINATED BY '\n';
> ERROR 1045 (28000) at line 3: Access denied for user 'hydro'@'localhost'
> (using password: NO)
> 
> Any clues?
> 
> Thanks!
> 
> 
>  Reyna
> _________________________________________________________
> Reyna Sabina                  Phone: (305) 361-4324
> NOAA/AOML/PHOD                Fax:   (305) 361-4392
> 4301 Rickenbacker Causeway    Email: [EMAIL PROTECTED]
> Miami, FL 33149-1087
> 
>     "Things do not get better by being left alone."
> 
>                            -Winston Churchil

----------------------------------------- Confidentiality Notice:
The following mail message, including any attachments, is for the
sole use of the intended recipient(s) and may contain confidential
and privileged information. The recipient is responsible to
maintain the confidentiality of this information and to use the
information only for authorized purposes. If you are not the
intended recipient (or authorized to receive information for the
intended recipient), you are hereby notified that any review, use,
disclosure, distribution, copying, printing, or action taken in
reliance on the contents of this e-mail is strictly prohibited. If
you have received this communication in error, please notify us
immediately by reply e-mail and destroy all copies of the original
message. Thank you.

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

Reply via email to