Results 1 to 9 of 9

Thread: mysql can't log in

  1. #1
    Join Date
    Mar 2011
    Location
    California
    Beans
    59

    mysql can't log in

    Code:
    $ mysql -p -u root
    Enter password:
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
    Not sure what I'm doing wrong. My google-fu may be too week:
    http://dev.mysql.com/doc/refman/5.1/...ss-denied.html

  2. #2
    Join Date
    Mar 2011
    Location
    California
    Beans
    59

    Re: mysql can't log in

    Code:
     
    mysqld_safe --skip-grant-tables
    That worked for me, but now it seems i don't need a password...

  3. #3
    Join Date
    Nov 2005
    Location
    Sendai, Japan
    Beans
    11,296
    Distro
    Kubuntu

    Re: mysql can't log in

    What exactly do you want to do? Have you set an initial root password? If you re using Ubuntu, you have been prompted for one in the debconf screen after you installed mysql.
    「明後日の夕方には帰ってるからね。」


  4. #4
    Join Date
    May 2009
    Location
    México
    Beans
    320
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: mysql can't log in

    Or maybe the root user is not allow to start a session.
    http://rukiaenix.blogspot.com

    I never really envision the finish of anything that I start. It's risk that fascinates, the moment of infinite possibility.

  5. #5
    Join Date
    Mar 2011
    Location
    California
    Beans
    59

    Re: mysql can't log in

    Running Linux Mint. Can't remember if I created a password. I installed by ...

    Code:
     
    sudo apt-get install mysql-server

  6. #6
    Join Date
    Nov 2005
    Location
    Sendai, Japan
    Beans
    11,296
    Distro
    Kubuntu

    Re: mysql can't log in

    Try

    Code:
    sudo dpkg-reconfigure mysql-server-5.5
    Or whatever your mysql version is. Don't do it on the mysql-server metapackage, it will not work.
    Last edited by Bachstelze; August 22nd, 2012 at 06:51 PM.
    「明後日の夕方には帰ってるからね。」


  7. #7
    Join Date
    Mar 2011
    Location
    California
    Beans
    59

    Re: mysql can't log in

    Quote Originally Posted by Bachstelze View Post
    Try

    Code:
    sudo dpkg-reconfigure mysql-server-5.5
    Or whatever your mysql version is. Don't do it on the mysql-server metapackage, it will not work.
    WORKED!!! next round of beer is on me! Thanks to all.

  8. #8
    Join Date
    May 2009
    Location
    México
    Beans
    320
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: mysql can't log in

    Well, let's wait for that beer, I'll join if it happens even though I didn't help xD but don't worry I'll pay my own beer xD
    http://rukiaenix.blogspot.com

    I never really envision the finish of anything that I start. It's risk that fascinates, the moment of infinite possibility.

  9. #9
    Join Date
    Nov 2012
    Beans
    1

    Re: mysql can't log in

    wow! it also worked for me - my very same problems started when I upgraded from Lucid to 12.04. I started receiving Access denied, spent a week trying to fix it... 3306 was open (terminal connection was accepted), iptables showed the port was also fine. mysqladmin was also returning access denied etc.

    Reinstallation (autoremove/autoclean/using software center) did not work as well... I tried all "default" pwds I could think of...

    mysqld_safe --skip-grant-tables did not work btw too, so I rm'ed the file manually....

    and smth from the above worked... one weird thing though...after all remove/autoclean/rm's I still after re-installation (when I got access to my db's) I see my older db's...

    not sure if it's feature or a bug....
    Last edited by BadB77; November 16th, 2012 at 02:41 AM.

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
  •