Skip to main content

Connect mysql cpanel, but hostname is a clone-server

Comments

12 comments

  • cPRex Jurassic Moderator
    Hey there! As a basic test, can you telnet to port 3306 on the remote MySQL server? If that doesn't work, it's unlikely anything else will work related to the remote database connection.
    0
  • vitor30221771
    What you mean? When I try to connect in 3306 port, I get the same error. I think I'm getting the wrong hostname
    0
  • cPRex Jurassic Moderator
    I'm not familiar with MySQL workbench. Just to confirm, you're trying to connect a remote application to the cPanel machine's MySQL database - is that correct?
    0
  • vitor30221771
    Yep! I will try to connect by localhost first, after I will use a remote application in another host
    0
  • cPRex Jurassic Moderator
    When you configured the Remote Host in cPanel (Remote MySQL" | cPanel & WHM Documentation) did you use your local machine's IP address? You can get the public outbound IP by visiting a site like ipecho.net.
    0
  • vitor30221771
    Yes. I use my public ip By the way, I write 'hostname -I' in terminal, and I get the local ip address in the print of this question. I think is it a private ip? I don't know, but make sense connect with this ip in the hostname field. Unfortanally, doesnt work :/
    0
  • cPRex Jurassic Moderator
    Normally I would expect that to work. Are you able to try the telnet test from your local machine to the server? You would just run this from your workstation's command line: telnet x.x.x.x 3306
    Where "x.x.x.x" is the IP of the server. If you're using Windows, you will likely need to install Telnet before it is available for use:
    0
  • vitor30221771
    Hmm, I didn't undestand when you said about telnet. So I use telnet and cannot get connection on 3306 port, only 2083 that is the Inteface. In phpmyadmin of cpanel, the hostname is that. By the way, the server is not secure (doesn't have ssl), but I dont think this the problem
    0
  • ServerHealers
    The phpMyAdmin would show that fine, that is because the MySQL is also installed on the same server so it could connect through localhost from phpMyAdmin or websites hosted on the same server. The SSL won't be an issue either. If the telnet connection is failing to 3306 port, then it could be a firewall blocking the connection. I'd make sure the TCP port 3306 is open in the firewall installed on the server or in an external firewal (if any)l or whitelist your local network public IP on the firewall to allow connections to all ports.
    0
  • vitor30221771
    Gotcha. Maybe should be the firewall server. This is'nt configured in cpanel, right? I know that the server is in google cloud and we installed cpanel in this server. To open 3306 port, I'll need to config server root, the google? Well, I hope my boss remember the access
    0
  • cPRex Jurassic Moderator
    Yes, you would need root access to configure the firewall on the server.
    0
  • vitor30221771
    Ok! Thanks for help anyway ;). If I solve this, I reply telling how I did it
    0

Please sign in to leave a comment.