"Rhino" <[EMAIL PROTECTED]> wrote:
> I am new to most aspects of MySQL administration so I was wondering if someone can 
> help me figure out what GRANTs I need for a particular situation.
>
> I have a user who needs to be able to run some MySQL scripts that create and load 
> tables in a database named NFL. He is accessing MySQL remotely from a client on a 
> Windows machine. Our server is running in Linux Mandrake 9.1; the client is Windows 
> 98SE.
>
> I've run the following grants for him:
> grant all on NFL.* to [EMAIL PROTECTED] indentified by 'xxxxx';
> grant all on NFL.* to [EMAIL PROTECTED] identified by 'xxxxx';
> grant file on NFL.* to [EMAIL PROTECTED] identified by 'xxxxx';
> grant file on NFL.* to [EMAIL PROTECTED] identified by 'xxxxx';
>
> When I try signing on as him from my remote Windows client, he can connect to MySQL 
> and get to the mysql prompt. He can run the script which creates and loads the 
> tables. However, he gets "Access Denied" on the Load Data Infile statements when the 
> script executes. 
>
> 1. Why is this happening? The Load Data article says he needs the File privilege and 
> I've given it to him. He also has all privileges on the NFL database. What more do I 
> need to do for him?

FILE is a global level privilege.
You should grant:

        GRANT FILE ON *.* TO [EMAIL PROTECTED] IDENTIFIED BY 'xxxxx';


>2. Are the privileges given to [EMAIL PROTECTED] redundant with the privileges given 
>to [EMAIL PROTECTED] They *look* redundant to me; I suspect I've misinterpreted 
>something I read in the manual. Can I get by with giving him just the [EMAIL 
>PROTECTED] privileges? Do I need to give him anything else to account for the fact 
>that he is coming in from a remote client?

localhost on Unix system means that you are using Unix socket connection.
127.0.0.1 means that you are using TCP/IP connection.
But you can't use these accounts to connect to the MySQL server remotely. Check with 
CURRENT_USER() function username and hostname that current connection was 
authenticated as.

>
>We are running MySQL 4.0.11a. gamma.



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com




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

Reply via email to