Connect mysql cpanel, but hostname is a clone-server

vitor30221771

Member
Nov 3, 2022
11
1
3
Curitiba PR
cPanel Access Level
Website Owner
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.

1668709941820.png

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
 
Last edited by a moderator:

vitor30221771

Member
Nov 3, 2022
11
1
3
Curitiba PR
cPanel Access Level
Website Owner
Yes. I use my public ip

1668714768707.png

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 :/
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
12,499
1,971
363
cPanel Access Level
Root Administrator
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:

Code:
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: https://social.technet.microsoft.co.../38433.windows-10-enabling-telnet-client.aspx
 

vitor30221771

Member
Nov 3, 2022
11
1
3
Curitiba PR
cPanel Access Level
Website Owner
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.

1668723520470.png

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
 
Last edited:

ServerHealers

Well-Known Member
Sep 21, 2015
59
28
68
India
cPanel Access Level
Root Administrator
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.
 
  • Like
Reactions: cPRex

vitor30221771

Member
Nov 3, 2022
11
1
3
Curitiba PR
cPanel Access Level
Website Owner
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