Jallekobber

Member
Jul 12, 2012
23
2
3
cPanel Access Level
Root Administrator
So I have created a remote database with the use of cPanel and I can connect to the database remotely over my other servers.

The problem exists where I try to edit anything from the database with use of a web application. I used a some hours to read up on what it might be and I read that there was something called MySQL resource limits? Does WHM / cPanel limit the use of MySQL?

The reason why I am writing here is because I think it's a cPanel issue. I have a firewall in place but it's working correctly as I can connect from my servers via the MySQL commandline to the database.

The following error is what I'm experiencing when I boot my panel or program:
production.ERROR: PDOException: SQLSTATE[HY000] [2002] Connection timed out in

Full error log of my program:

hastebin

Thank you in advance and I hope I posted it in the correct forum.

Regards, Jacob
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,205
363
Hi Jacob,

MySQL limits are not imposed by the cPanel & WHM software unless you are using a third-party application such as MySQL Governor with CloudLinux. Do you notice any output to the MySQL error log when this happens? It's located at /var/lib/mysql/$hostname.err. Also, what settings are you using in your /etc/my.cnf file?

Thank you.
 

Jallekobber

Member
Jul 12, 2012
23
2
3
cPanel Access Level
Root Administrator
Dear Michael.

Thank you for your response.

I have looked through the log of the server and I only see a lot of:

[Warning] IP address 'XX.XX.XX.XX' has been resolved to the host name 'Different IP', which resembles IPv4-address itself.


is this a bad or good thing? There's thousands of lines of this just in one day.

This is the my.cnf config:

[mysqld]
innodb_file_per_table=1
default-storage-engine=MyISAM
performance-schema=0
max_allowed_packet=268435456
open_files_limit=10000


Thank you in advance.

Regards, Jacob
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,205
363
Hello,

The output you posted from the MySQL error log is just a warning and shouldn't lead to the issue you have described.

P.S I whitelisted the resolved IP and now it works. Do you have any idea why this is happening? I am using a VPS from OVH.
That suggests the IP address hosting the application was restricted by your firewall rules. It's likely port 3306 is blocked (this is common in firewall rules), and thus allowing the remote IP address let it make the connection.

Thank you.
 

Jallekobber

Member
Jul 12, 2012
23
2
3
cPanel Access Level
Root Administrator
Dear Michael.

Thank you for the update. I had already added the servers real IP address but it was after adding the resolved IP:

Which I saw no where listed as my servers IP address.
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,205
363
Thank you for the update. I had already added the servers real IP address 54.37.75.237 but it was after adding the resolved IP: 37.ip-54-37-75.eu
The warning message you referenced actually does appear to be related to the issue, as it looks like this is due to the RDNS record configured for that specific IP address. There's some background information on this topic at:

MySQL Bugs: #81132: MySQL doesn't allow access to host names that are just numeric

Generally, the best way to solve this issue would be to reach out to the provider that handles the referenced IP address and to request an update to the RDNS record so it points to an actual hostname. Or, as you already did, you could whitelist the hostname itself.

Thank you.
 

Jallekobber

Member
Jul 12, 2012
23
2
3
cPanel Access Level
Root Administrator
Dear Michael.

Weird that it's the first time I hear this. I will make sure that happens in the future and try to spread the word because I have never seen this before regarding MySQL.

Thank you so much for your insider knowledge. Great to have cPanel as a friendly support!

Kind regards,

Jacob.
 
  • Like
Reactions: cPanelMichael