The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Setup problem for remote MySQL server

Discussion in 'Database Discussions' started by Cedis, Jun 25, 2013.

  1. Cedis

    Cedis Member

    Joined:
    Jun 18, 2012
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi!

    Have a pretty small cPanel setup and I have created a new VPS to server as a pure database server to speed things up a bit. Really eager when I bought the VPS, but now, I'm kinda bummed because cPanel won't let me use the new VPS.

    The remote VPS server is an OpenVZ with Debian 6.0 with freshly installed MySQL. That's it.

    Doing the setup process, cPanel generated the following error:

    (connecting using root and password, no public key)

    Code:
    Using Remote MySQL Server
    Fetching password from remote mysql server.... Copying mysql configuration from remote host......Done
    Done
    Generating Setup Script....Done
    
    Copying MySQL Script.....0%.. ..100%.. ...Done
    Running MySQL Script...
    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
    195.x.x.x whm.x.se
     
    Done
    Testing new mysql setup...Failed to connect to the remote mysql host:
    /usr/bin/mysqladmin: connect to server at '109.x.x.x' failed
    error: 'Access denied for user 'root'@'whm.x.se' (using password: YES)'
    
    Restoring old mysql config. Please resolve the above error and try again.
    On the remote MySQL server I have the following in /etc/hosts

    Code:
    ::1 localhost.localdomain localhost
    # Auto-generated hostname. Please do not remove this comment.
    127.0.0.1 localhost localhost.localdomain
    195.x.x.x whm.x.se
    
    In /etc/mysql/my.cnf I've removed: bind-adress 127.0.0.1

    root have the following allowed hosts:
    %, localhost, 127.0.0.1, whm.x.se, 195.x.x.x.

    root also have % % and ALL privileges, including grants.

    Now what's the problem? :)
    What have I missed?
     
  2. Cedis

    Cedis Member

    Joined:
    Jun 18, 2012
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Noone? =/ Have I not explainted it well enough? I've tried googling this but there really is no answer, except for someone hinting of "internal" script problems with firewalls.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    The error message indicates the root password you are using for MySQL on the remote server is not valid. Could you access the remote MySQL server via SSH and see if the root password for MySQL is working? You can test this with a command such as:

    Code:
    mysql -u root -p
    Thank you.
     
  4. Cedis

    Cedis Member

    Joined:
    Jun 18, 2012
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    It's very much the correct root password. I even tried setting the root SSH password and the MySQL password the same, since cPanel doesn't ask for a specific mysql root login password when wanting to setup the remote server script.

    What password is cPanel attempting to connect to the MySQL database with? Same as the one I entered as SSH password?

    I'm able to from the dedicated server, login with SSH or MySQL to my new remote database server.

    Why can't the cPanel script do the same?
     
  5. Cedis

    Cedis Member

    Joined:
    Jun 18, 2012
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Can I pay from cPanel to get this fixed?
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Feel free to open a complimentary support ticket so we can take a closer look:

    Submit A Ticket

    You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  7. Cedis

    Cedis Member

    Joined:
    Jun 18, 2012
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    The issue has been fixed now.

    The problem was that durng the MySQL installation the /root/.my.cnf file was never created, hence cPanel could not find the correct MySQL login credentials.
     
Loading...

Share This Page