Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Jul 2006
    Location
    UK
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ERROR 1045 (28000): Access denied for user

    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

  • #2
    Super Moderator guelphdad's Avatar
    Join Date
    Mar 2006
    Location
    St. Catharines, Ontario Canada
    Posts
    2,631
    Thanks
    4
    Thanked 147 Times in 138 Posts
    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.

  • #3
    New Coder
    Join Date
    Jul 2006
    Location
    UK
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #4
    Super Moderator guelphdad's Avatar
    Join Date
    Mar 2006
    Location
    St. Catharines, Ontario Canada
    Posts
    2,631
    Thanks
    4
    Thanked 147 Times in 138 Posts
    Then you are using a shared server and can't grant access with the root user.

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

  • #5
    New Coder
    Join Date
    Jul 2006
    Location
    UK
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #6
    New Coder
    Join Date
    Jul 2006
    Location
    UK
    Posts
    56
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •