Results 1 to 8 of 8

Thread: New mysql user cant login

  1. #1

    New mysql user cant login

    i installed a lamp setup with the following.

    Code:
     sudo apt-get install apache2 php5 mysql-server php5-mysql
    ive set this up before but dont remember exactly which packages i used. anyhow it seems to work accept i cant seem to loging with the new user account. i add a user with a password and select all priveleges but then i log out and try to log in with the new account and i get this error everytime. did i forget something? thanks.

    Code:
    #1045 - Access denied for user 'uknowho008'@'localhost' (using password: YES)

  2. #2
    Join Date
    Apr 2008
    Location
    Phoenix, AZ
    Beans
    1,393
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: New mysql user cant login

    Did you do "flush privileges;" after creating the new user?

  3. #3

    Re: New mysql user cant login

    Quote Originally Posted by Monicker View Post
    Did you do "flush privileges;" after creating the new user?
    yes, its still not working.

  4. #4
    Join Date
    Apr 2008
    Location
    Phoenix, AZ
    Beans
    1,393
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: New mysql user cant login

    I would verify that same uername was not created with different host specifications and passwords.

    from the mysql cli:

    Code:
    use mysql;
    select User,Host,Password from user where User='uknowho008';

    I've accidentally done it myself before, where I had 'johndoe'@'localhost' with one password and 'johndoe'@'hostname' with a different password.

  5. #5

    Re: New mysql user cant login

    Quote Originally Posted by Monicker View Post
    I would verify that same uername was not created with different host specifications and passwords.

    from the mysql cli:

    Code:
    use mysql;
    select User,Host,Password from user where User='uknowho008';

    I've accidentally done it myself before, where I had 'johndoe'@'localhost' with one password and 'johndoe'@'hostname' with a different password.
    what am i checking here? just that there is only one entry? there is only one entry and host is set to % for any i believe. the password is encrypted but the first character is a * and ive never seen that before. is that correct?

  6. #6
    Join Date
    Apr 2008
    Location
    Phoenix, AZ
    Beans
    1,393
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: New mysql user cant login

    Ahh. You mentioned earlier that the account had been created as a localhost account. I have seen this before, where mysql will not let an account access directly from the local machine unless its account is specifically for 'user'@'localhost'.

    Try to connect to that account from a machine other than the mysql server. If that works, create the same username @ localhost with the same password.

  7. #7

    Re: New mysql user cant login

    Quote Originally Posted by Monicker View Post
    Ahh. You mentioned earlier that the account had been created as a localhost account. I have seen this before, where mysql will not let an account access directly from the local machine unless its account is specifically for 'user'@'localhost'.

    Try to connect to that account from a machine other than the mysql server. If that works, create the same username @ localhost with the same password.
    hmmm... well i tried logging in with another machine and it didnt work. but then i changed the host to localhost anyways and it worked. so i guess thats all i need. thanks for helping me figure this out.

  8. #8
    Join Date
    Jul 2006
    Location
    US
    Beans
    235
    Distro
    Kubuntu 11.10 Oneiric Ocelot

    Re: New mysql user cant login

    Thank you very much!

    I was having this problem with every new user I created, and I was having to use "root" for a while instead of the usernames I created. XD

    Adding the host 'localhost' solved it--those usernames finally work.

Bookmarks

Posting Permissions

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