Can't set up root password on MySQL server for Ubuntu 6.06

Discussion in 'Installation/Configuration' started by simianstyle, Jun 5, 2006.

  1. simianstyle

    simianstyle New Member

    I've been following the Ubuntu 6.06 "perfect setup" tutorial word for word - and yet the MySQL part doesn't seem to work for me. Whenever i try and set the password at this point:
    mysqladmin -h -u root password yourrootsqlpassword
    I always get the error:

    mysqladmin: connect to server at '' failed
    error: 'Host '' is not allowed to connect to this MySQL server'
    As you can tell, instead of calling my server "server1", i've decided to call it "transit". The static IP of the server within my network is, and i've set the root sql password already in this step:

    mysqladmin -u root password yourrootsqlpassword
    It's obviously somethign other than "yourrootsqlpassword", but when i try and connect to my server - it won't allow me. I'm doing this all on the local machine (not using PuTTY or anything), and instead of the Ubuntu server edition - i'm using the desktop edition (although it should still work the same for both).

    I'd appreciate any help resolving this issue. Thanks.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Dont worry about that error. Proceed with the other steps and when you are finished, install the phpmyadmin pacakge in ISPConfig and check that there are no empty root passwords in the mysql user table.
  3. falko

    falko Super Moderator Howtoforge Staff

    Also make sure that MySQL is listening on all interfaces and that your hostname is really
  4. simianstyle

    simianstyle New Member

    Well i finished the installation, and got everything up and running with ISPConfig. However when i navigate to the user table in the MySQL database via PHPMyAdmin, there is an empty root password. This is what i see:


    I think i might've messed up somewhere because there are two root users, but only one of them have a password. I'm very new to all of this - so an advice on what i should do at this point would be greatly appreciated.
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats OK. One root user account is for login from localhost, the other is for login from host "transit".

    Just edit the root user record with the empty password, enter you password in the password field and select "PASSWORD" in the function field to encrypt your password.

    To edit the password on the shell, you might try this:

  6. simianstyle

    simianstyle New Member

    That works perfectly Till, thanks for your help!
  7. domino

    domino New Member


    This is really strange. No matter if I user server1,, or localhost, i get the same error whe trying to set the password.
    mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: NO)'
    I can not go any further in ISPConfig installation without the correct password, which have not been set. If I enter a blank pssword in ISPConfig setup it still gives me this error.
    Please enter your MySQL password:
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
    The provided MySQL password is wrong!
  8. glennb

    glennb New Member

    I also get the same error as the OP, and I can't work out a way around it.
    Having completed the install, I can reach the server on (e.g.)


    and I get the login screen, but I am not able to login with a blank password, or with the password I tried to set.

    Can anyone give this mysql newbie a clue how to proceed?


  9. falko

    falko Super Moderator Howtoforge Staff

    @domino: What commands exactly did you run that gave you these errors?

    @glennb: The defaulr login after the initial ISPConfig installation is username admin, password admin, as described here: :)
  10. glennb

    glennb New Member

    Ouch. Now I feel dumb.:eek:

    I can login fine now, thanks. A few DNS wrinkles to iron out, but looking good!

    I'm off to read the manual before asking any more stupid questions.


  11. domino

    domino New Member

    Damn mate. I didn't get a response email about the new reply on this thread. I got those messages from the beginning of the Ubuntu installation. The weard thing is, I gave up on it and left ISPConfig install (the db part) as is and went to bed. The following morning, I typed the password and it accepted it! Damned boogie man :mad: Everything is okay now.

    A little suggestion, since you have gotten a lot of questions about the initial username and password for ISPC, would it hurt to include the name and password immediately after the ISPConfig installation is finished?
    Last edited: Jun 17, 2006
  12. donanak

    donanak New Member

    I'm also getting the same error [root@server0 ~]# mysqladmin -u root password *******
    mysqladmin: connect to server at 'localhost' failed
    error: 'Access denied for user 'root'@'localhost' (using password: NO)'

    when i use webmin interface to login i get this error:
    The full MySQL error message was : connect to server at 'localhost' failed error: 'Access denied for user 'root'@'localhost' (using password: YES)'

    Following the howto I didn't get any error until finished and tried to log in to mysql. So i decided to uninstall it with this command: yum remove mysql

    Then reinstall it again and now it comes with the error above. I'm not using ISPConfig. I've followed stacks of "howto reset password" and still no sunshine.

    Please can someone help me get this out of the way, as all my other services i'm going to setup requires mysql login.

    Thanks in advace.
    Last edited: Jun 18, 2006
  13. falko

    falko Super Moderator Howtoforge Staff

    Yes, we could include it in the message about the successful installation.
  14. falko

    falko Super Moderator Howtoforge Staff

    This means you have already set a password for MySQL. To change it, have a look here:
  15. donanak

    donanak New Member

    Thanks Falko,
    I could now log on to mysql with my new password using webmin, but for some reason it wouldn't work on the command line.

    I could see only one encrypted password for user root on host local host with permission All. Another root with host server0.tld has blank space for encrypted password and permission is ALL.
    Then there is 2 anonymous users, for host localhost and server0.tld with blanks for encrypted password and permission NONE.

    I don't know if this gives the clear picture of the table, but can anyone help me make things right? I tried to copy and paste the table but it keeps messing up as scrumbled eggs.

    Thanks alot. :)
    Last edited: Jun 18, 2006
  16. falko

    falko Super Moderator Howtoforge Staff

    This means you must also run
    mysqladmin -h server0.tld -u root password yourrootsqlpassword

Share This Page