...

View Full Version : ERROR 1045 (28000): Access denied for user



jackam1
07-27-2006, 10:38 AM
Hi

I am very new to Mysql. All I want to do is load a simple txt file to a database.
I use the follwoign command:
mysql> LOAD DATA INFILE "30000lines.txt" INTO TABLE mytable;
and i get the following error:
ERROR 1045 (28000): Access denied for user 'userme'@'%' (using password: YES)
When I do a grant for teh tabel i get the following message:
+-----------------------------------------------------------------------------------------------------------------------+
| Grants for userme@% |
+-----------------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'xxxx'@'%' IDENTIFIED BY PASSWORD '********' |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES ON `xxxxxx`.* TO 'xxxxx'@'%' |
+-----------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)

Presumably all i need to do it grant myself all the permissions, but how?
I have read alot on grants but I don not need to create a new user.
All help is appreciated.
thanks
jack

guelphdad
07-27-2006, 04:11 PM
You don't have FILE permissions. YOu would need to add those. If you have direct access to mysql (rather than through phpmyadmin say), then switch to the mysql database and within the user table set FILE_PRIV='Y' for that specific user and then FLUSH PRIVILEGES.

jackam1
07-27-2006, 04:48 PM
Hi
Thanks for your commnet.
The only thing I have access to is through the control panel.
However I can connect through ssh and get a mysql prompt on the screen.
Can I so anything with these facilities?
jack
p.s. It doesn't even let me log on as root

guelphdad
07-28-2006, 03:46 AM
Then you are using a shared server and can't grant access with the root user.

change

LOAD DATA INFILE "30000lines.txt" INTO TABLE mytable;
to this:

LOAD DATA LOCAL INFILE "30000lines.txt" INTO TABLE mytable;

jackam1
07-28-2006, 08:13 AM
Hi

When I try to upload the data using above line , I get this error..
-----------------
SQL Error
Permission to perform action denied!

MySQL Said: Access denied for user 'myusername'@'%' (using password: YES).
Query: LOAD DATA INFILE "30000lines.txt" INTO TABLE test2

-----------
Any advice? I am abit stuck..
thanks
jack

jackam1
07-28-2006, 11:12 AM
Hi
Problem solved eventually.
I used a fantastic program named CpcoaMySQl for mac osx which imported my large file to the mysql database.
It some how did not need need the permission that others needed.
Thnaks for all your help
jack



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum