#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    3
    Rep Power
    0

    Always get "Access denied for user 'root'@'localhost'" after installing


    Hey there,

    got an Ubuntu 10.04 v-server to install. First I have to reinstall mysql to reset all mysql-stuff on this mashine.

    # remove installation first
    sudo apt-get --purge remove mysql-server mysql-common mysql-client libmysqlclient15-dev libmysql-ruby

    # reinstall mysql for a fresh instance
    sudo apt-get install mysql-server

    # all 3 password request, I answer them with <enter> to have a default password of ""

    # now trying to get the mysql console with root
    mysql
    # ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

    # or
    mysql -uroot -hlocalhost
    mysqladmin --no-defaults -u root version

    # all the same error

    Hope you can help me.

    So long Marco
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2009
    Posts
    157
    Rep Power
    89
    Try setting a password during install.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    3
    Rep Power
    0
    thx for your answer. Already did before. But I do it again to see what happen.

    # deinstall
    root@...:~# sudo apt-get --purge remove mysql-server mysql-common mysql-client libmysqlclient15-dev libmysql-ruby

    # install with passwort "a"
    root@...:~# sudo apt-get install mysql-server

    # try to come into mysql console
    root@...:~# mysql
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
    root@...:~# mysql -uroot -p
    Enter password: (enter "a")
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

    Whats wrong? Access from localhost is allowed. Is sth special when I try to connect with putty to v-server shell?

    thx for your help
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    3
    Rep Power
    0
    For all, who are interested for the answer:
    Plesk was installed. Something causes to overwrite my root password. I reinstall ubuntu without plesk. This works for me.

    thx for help

IMN logo majestic logo threadwatch logo seochat tools logo