Connect mysql cpanel, but hostname is a clone-server
I'm trying to connect in mysql, but I'm getting errors. My company has a server, where cpanel is installed. I try to use the url like hostname, but doesn't work. For example, to connect cpanel, I use 'server.genericompany.com:2083'.
I know that we use shared hosting. When I trying to see the hostname in cmd or in phpmyadmin, I get ' clone-server' value, but it's not a valid hostname. I don't have acess in
the other server now, where shared hosting pointing, but I can get it soon.
This shared server has cpanel installed too, but the db's are different. When I in that shared ip adress cpanel, I can't see db of the clone-server. The same is for clone-server.
I will list what I have tried:
- Allow my ip in allowed hosts
- I use the url, shared ip adress, local adress like hostname, but does'nt work.
- Get db credentials in cpanel, but everwhere use 'localhost' value. Its make sense, I think. When files are in server, the server is the localhost
-
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 -
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 -
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 -
Yep! I will try to connect by localhost first, after I will use a remote application in another host 0 -
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 -
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 -
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 -
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 -
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 -
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 -
Yes, you would need root access to configure the firewall on the server. 0 -
Ok! Thanks for help anyway ;). If I solve this, I reply telling how I did it 0
Please sign in to leave a comment.
Comments
12 comments