Results 1 to 4 of 4
  1. #1
    Join Date
    May 2005
    Posts
    5

    Unanswered: Error 1045 (28000):

    Hello,

    A few days ago I bought a vserver. I was planing to use it for the mysql database.
    When i login as root and trying to access mysql I get this error message.

    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

    I tried these commands

    mysql -uroot -ppassword mysql

    mysql -uroot -p'' mysql

    but non of them works (same error) !

    would be great if I can find support here.

    reagards

    Bek

  2. #2
    Join Date
    Apr 2005
    Location
    Baltimore, MD
    Posts
    297
    Make sure you're using the correct password. It shouldn't be a permissions issue if it is a clean install and you are connecting as root. Also, you don't need to specify a database to connect to. (And using the `mysql` database directly is generally a very bad idea...)
    Code:
    shell> mysql --user=user_name --password=your_password db_name
    If you can't remember your password, reinstall it.
    http://dev.mysql.com/doc/refman/5.0/en/mysql.html

  3. #3
    Join Date
    May 2005
    Posts
    5
    the password is 100% correct, do you have any other idea what i can do ?

  4. #4
    Join Date
    Apr 2005
    Location
    Baltimore, MD
    Posts
    297
    The (using password: NO) part of your error is telling you that either 1.) you are not entering a password, or 2.) you are trying to enter the password incorrectly. Just for kicks, try using the --user=user_name --password=your_password syntax.

    Also, if you leave the password blank, and use
    Code:
    mysql -uroot -p mysql
    it should prompt you for a password.
    Last edited by jfulton; 04-10-06 at 12:53.

Posting Permissions

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