Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2005
    Posts
    3

    Exclamation Unanswered: Cannot connect to database

    I am new at this so I will be brief. I keep getting this error when I try to add tables from the command line using MySQL - ERROR 1044: Access denied for user: '@localhost'...can someone show me or point me in the right direction to change the access so that I can start adding elements to my database?

    thanks!

  2. #2
    Join Date
    Jun 2005
    Posts
    23
    Post the exact command you are using to connect to the server

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    What privileges do you have to that database / server
    what Grants have been assigned

    Have a look at the MySQL manager for 'Grant Privileges'

  4. #4
    Join Date
    Oct 2005
    Posts
    3

    The command I am using

    Is "use testDB;"......as far as the priviliges are concerned, I am simply doing exercises on my laptop so I am the registered owner. I couldnt locate the "Grant Privileges" option in MySQL..any idea where to help a ROOKIE??

  5. #5
    Join Date
    Apr 2005
    Location
    Baltimore, MD
    Posts
    297
    You need to set up a user to have the correct permissions and then log in as that user.

    Pretty sure you didn't log in to mysql (hence the: ''@localhost). Log in like:
    Code:
    mysql --user=user_name --password=your_password db_name
    Also, do you have the users set up correctly? To set up a new user with all permissions try something like:

    Code:
    GRANT ALL PRIVILEGES ON * . * 
    TO 'user_name'@'localhost' 
    IDENTIFIED BY 'your_password' 
    WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0
    MAX_CONNECTIONS_PER_HOUR 0 
    MAX_UPDATES_PER_HOUR 0 ;
    Replacing 'user_name' and 'your_password' with the correct info. Then log in as that user.



    or even easier, get phpMyAdmin

  6. #6
    Join Date
    Oct 2005
    Posts
    3

    Ok

    will do! thanks again for the assistance and I am SURE I will be back if I have any more problems/issues! Good looking out!

Posting Permissions

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