Msql Password setup problem

Discussion in 'HOWTO-Related Questions' started by robbiewo, Sep 27, 2006.

  1. robbiewo

    robbiewo New Member

    i am new to mysql setup and have looked for forums on this subject but if it does exist please redirect me to link

    i have been folowing the howto perfect setup fedora5 server with isp config
    and get problems with the mysql password setup.the commands are as follows

    mysqladmin -u root password yourrootsqlpassword
    mysqladmin -h server1.example.com -u root password yourrootsqlpassword



    the first line works well and i can set root password but the second line i get the error
    'Access denied for user 'root'@'localhost' (using password: NO)'

    any help much apprecaited
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You can ignore that. Complete the install and change the second mysql password with phpmyadmin after you finished the ISPConfig installation.
     
  3. armitage

    armitage New Member

    etch

    Hi,

    I'm at this stage:
    Please enter your MySQL server: E.G. localhost
    Please enter your MySQL user: E.G. root
    Please enter your MySQL password: Your MySQL password

    I'm getting

    ERROR 1045 (28000): Access denied for user 'root'@"blahblah.com' (using password: YES)
    The provided MySQL password is wrong!

    Is there anything I can do to not have to reinstall this again?
    I triple checked the password at msql stage, it seems I must have been blind on the night.
    thanks for your help again in advance

    A
    :d
     
  4. falko

    falko Super Moderator ISPConfig Developer

    Can you log in with your password when you type in
    Code:
    mysql -u root -p
    ?
    If not, does
    Code:
    mysql -u root
    work?
     
  5. armitage

    armitage New Member

    this is what I get

    Code:
    
    web:/# mysql -u root -p
    Enter password:
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
    web:/# mysql -u root
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
    
    
     
  6. falko

    falko Super Moderator ISPConfig Developer

    Then your password is wrong, or the Hostname column in the mysql.user table doesn't contain localhost.
     
  7. armitage

    armitage New Member

    reinstall # 5 fixed it. using $ in password seemed to be the issue.
    thanks
    :D
     
  8. chez17

    chez17 New Member

    I am having the same issue, I checked the database and there are 3 users with the name root. I am doing your ubuntu 7.04 perfect setup tutorial. Each user with the name root has a different host. they are 127.0.0.1, localhost, and server1.example.com. So I do have a localhost listed and I do have the password right, it still wont let me connect on the command:

    mysqladmin -h server1.example.com -u root password yourrootsqlpassword

    If i already changed the password via mysql, do I even need to do this?
     
  9. falko

    falko Super Moderator ISPConfig Developer

    And is server1.example.com what you get when you run
    Code:
    hostname -f
    ? If not, you must change the hostname in the Host column.
     
  10. mhamed.hmimid

    mhamed.hmimid New Member

    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)

    Hello all
    I use linux mandriva 2008.1
    The computer is an acer notebook
    I tried to install a local server
    installed apache
    worked
    Installed php worked
    mysql no
    i tried to install the mysql gui tools
    from terminal i tried the following codes:
    #su
    #root password
    #service mysqld start ok
    #exit
    #
    $mysql -u root -p
    $password
    $ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
    $mysql -u root
    $ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
    $hostname -f
    $localhost
    I ve been struggling to work with mysql for 2 months now but invain
    But still i m testing installing and disinstalling mysql
    the same problem
     
    Last edited by a moderator: Apr 22, 2008
  11. falko

    falko Super Moderator ISPConfig Developer

    Are you using one of the "Perfect Server" guides from HowtoForge to set up your system?
    Which distribution are you using?
     
  12. george.t.miller

    george.t.miller New Member

    Hey Falco,

    I am a TOTAL newbie. I am using your tutorial "The Perfect Server - CentOS 4.5 (32-bit)" to install. I am using Centos 4.6, but I don't think that should make a difference.

    in any case, the first run on installing mysql it took the first password setup command line but failed on the second one (mysqladmin -h server1.example.com -u root password yourrootsqlpassword). I pressed on to the end where it says "you can now install ISPconfig". Then I came back and tried to get that one to work. It didn't. I repeated the first one, it failed. I ran "yum remove" on the sql applications and then reinstalled them. It still failed on both password setup lines, giving the same errors shown in this post (Access denied for user 'root'@'localhost' (using password:Yes)).

    I am stuck. How do I rectify this problem. I have stopped the tutorial at the end and am holding off on installing ISPconfig until I have this resolved. How do I set these passwords and user names and host names in this mysql application?

    I am really green, so the more detailed the help, the better.

    Thanks in advance for your help. Sincerely, George:)
     
  13. george.t.miller

    george.t.miller New Member

    Same problem from a total newbie..

    Hey Falco (or anyone who can help),

    I am a TOTAL newbie. I am using your tutorial "The Perfect Server - CentOS 4.5 (32-bit)" to install. I am using Centos 4.6, but I don't think that should make a difference.

    in any case, the first run on installing mysql it took the first password setup command line but failed on the second one (mysqladmin -h server1.example.com -u root password yourrootsqlpassword). I pressed on to the end where it says "you can now install ISPconfig". Then I came back and tried to get that one to work. It didn't. I repeated the first one, it failed. I ran "yum remove" on the sql applications and then reinstalled them. It still failed on both password setup lines, giving the same errors shown in this post (Access denied for user 'root'@'localhost' (using password:Yes)).

    I am stuck. How do I rectify this problem. I have stopped the tutorial at the end and am holding off on installing ISPconfig until I have this resolved. How do I set these passwords and user names and host names in this mysql application?

    I am really green, so the more detailed the help, the better.

    Thanks in advance for your help. Sincerely, George:)
     
  14. falko

    falko Super Moderator ISPConfig Developer

    Take a look at chapter 8 on http://www.howtoforge.com/perfect_server_opensuse10.3_p4 , beginning with "As you've seen in the netstat output, MySQL is not only listening on localhost, but on all interfaces, which means it can be accessed from the outside. Therefore we need to set a password for the user [email protected] as well. But there's one little problem: most likely the Host column in the mysql.user table doesn't contain server1.example.com, but server1. We will change that now, and afterwards we will set a MySQL password for the user [email protected]."
     

Share This Page