MySQL Forums
Forum List  »  Security

Access denied when trying to load data
Posted by: Ken Tassell
Date: January 21, 2005 07:14AM

Hi,

When I create a database and attempt to load data using the 'load data infile' command I get errors, see the sequence of commands below that describe the problem.

mysqladmin -uroot -p create kentest

login as root to mysql

mysql> GRANT ALL PRIVILEGES ON kentest.* TO 'kentest'@'%' IDENTIFIED BY 'kentest1';

login as kentest to mysql, use kentest;

LOAD DATA INFILE "e:\\db_build\\dataload\\momdv2\\data\\datafiles\\momdcodedef.txt.txt"
INTO TABLE momd_codedef FIELDS TERMINATED BY '|'
LINES TERMINATED by '\r\n';
ERROR 1045 (28000): Access denied for user 'momdv210_cp'@'%' (using password: YES)

However, if I define the database grants like this (grants to all databases *.*) the load command works fine.
mysql> GRANT ALL PRIVILEGES ON *.* TO 'kentest'@'%' IDENTIFIED BY kentest1';

Seems I should be able to grant access to only the kentest database and be able to load data. I can create and drop tables fine, just the load fails. Maybe I am missing a needed grant for loading data, I am new at using MySQL.

Thanks in advance for any assistance on this...

Ken Tassell
ktassell@drugfacts.com

Options: ReplyQuote


Subject
Views
Written By
Posted
Access denied when trying to load data
61668
January 21, 2005 07:14AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.