Mysql root password problem>??

Discussion in 'Server Operation' started by B4ssM4n, Jun 26, 2006.

  1. B4ssM4n

    B4ssM4n New Member


    I was going through the setting up a "perfect_setup_ubuntu_6.06_p4" and right at the bottom it mentions these two commands;

    * mysqladmin -u root password yourrootsqlpassword
    * mysqladmin -h -u root password yourrootsqlpassword

    However, I get these two messages;

    * mysqladmin: connect to server at 'localhost' failederror: 'Access denied for user 'root'@'localhost' (using password: NO)'
    * mysqladmin: connect to server at '' failederror: 'Host '' is not allowed to connect to this MySQL server'

    I take it "yourrootsqlpassword" is one i'm supposed to have setup? If so can you explain how I would go about setting these passwords, as I know these are very important!

    This is the page in question --

    I'm new to Ubuntu but not scarred of command line executions so i'm hoping to learn quick fast I have beenusing windows since 3.1 missed out 95 straight to 98SE then XP played a bit with server edition - as i'm wanting to run my own server. After searching the net realised Linux does the best job and
    have tested several version and settled for Ubuntu.
  2. platd

    platd New Member

    Is mysql server up and running ?
    do any thing?
    and what does
    show ?
  3. B4ssM4n

    B4ssM4n New Member

    My SQL after doing netstat -tap is showing as being up and available.

    Hostname is showing a itworkz
    Hostname -f is showing

    MySQL is running I have not turned it off.
  4. platd

    platd New Member

  5. B4ssM4n

    B4ssM4n New Member

    I get this when typing mysql

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

    platd New Member

    mysql -h -u root -p

    then supplying the pass you may have set gives ?


    mysql -u root -p
  7. B4ssM4n

    B4ssM4n New Member

    I typed what was written exactly with out thinking so I put yourrootsqlpassword as password, doh!

    after typing mysql -h -u root -p I get >

    ERROR 1130 (00000): Host '' is not allowed to connect to this MySQL server

    and after

    mysql -u root -p i get

    Your MySQL connection id is 25 to server version: 5.0.22-Debian_0ubuntu6.06-log

    Type 'help;' or '\h' for help. Type '\c' to clear the buffer.


    and I used yourrootsqlpassword hmm

    Proper screwed this up some how didn't I!!
  8. platd

    platd New Member

    It's nothing major now you are in you can read up and secure it correctly
    Hope it all works out for you
  9. B4ssM4n

    B4ssM4n New Member

    Cool thanks for your help :) man
  10. falko

    falko Super Moderator Howtoforge Staff

    So it's working now? :)
  11. cybere

    cybere New Member

    Mysql still falling password entry

    Greetings again,

    I have followed the tutorial to the letter.

    Right up until i have to enter the 2nd mysqladmin command, everything is going smooth.

    However at that point it says I am unable to connect to the server.

    Having read this thread, i tested the commands specified by platd, I find I also have connectivity to mysql with the following:

    [root@mmm named]#mysql -u root -p

    this then requests a password, which is my root password, and this provides me with the mysql prompt.

    I am also able to supply:

    [root@mmm named]#mysql -h -u root -p

    this then requests a password, which is my root password, and this provides me with the mysql prompt.

    I however did not just cut and paste the mysqladmin commands, and I did use my own root password.

    Only difference between mine, and the person creating this thread is:

    hostname -f

    When configuring the network interface manually(final stages of FC5 installation), it asks for a manual entry. Here i supplied
    Should this have just been 'localhost' perhaps, or 'mmm' instead of the ''?

    This will be installation attempt 9, and im just about over it. The first time I completed an FC5/ISPConfig installation, there were some minor issues, but this is getting stranger and stranger.

    Please, any advice would be appreciated.
  12. cybere

    cybere New Member

    Greetings again,

    I just tried to telnet into mysql with:

    telnet 3306

    and got...

    Connected to localhost.localdomain (
    Escape character is '^]'
    5.0.27{dcCdN<}$7'__L&vB':OConnection close by foriegn host.

    netstat -tap provides me with the required output as found in FC5 installation docs.

    sorry for the trouble.
  13. cybere

    cybere New Member

    Frustation has won again.....

    After a complete resinstallation...again...there was some strange alias listings in the network config tool. They have been fixed, prior to mysql yum install.

    now.. there has been some slight advancement, but now the error is slightly different.

    All logins/passwords are as root.

    when entering:

    mysqladmin -h -u root password mypasswd

    it says:'mysqladmin: Can't turn off logging; Error: Access denied: you need to have SUPER privilege to perform this operation'

    root passwords still permit me mysql access with >mysql -u root -p

    anyways...unbelievably frustrated seriously chasing some helpful advice.

    Thanks in advance.

    hmm ps: Postgres I know wont permit the root to change passwords, one must login as 'postges' to enforce changes(in postgres, there is no root user). Could this also be a mysql issue? i know im reaching now but...
  14. falko

    falko Super Moderator Howtoforge Staff

    Did you disable SELinux?

    What's the output of
    netstat -tap
    ? What's in /etc/hosts?
  15. cybere

    cybere New Member

    Thanks Falko,

    No idea what it was, but a fresh start from scratch has seen it go through this time......go figure.

    however, i now have a conflicting certificate after the ispconfig installation completes, and i try to access the admin panel.

    So i will start going through the forums again.

    Thanks again.
  16. martinfst

    martinfst Member Moderator

Share This Page