For those having Database Connectivity Issues

This may only be the case for a very small number of people using CDN networks, I use CloudFlare on some sites and on others i use StackPath. I found quite a problem connecting to my databases when using StackPath and found only one way around it. It is a pain but it works.
In StackPath, navigate to WAF > Rules and create a new rule to allow all traffic from your public IP, also please keep in mind that if your public IP is being assigned dynamically, well then it changes and each time you want to make alterations to the website using StackPath, you will have to go and alter the allowed IP address.
This second step you will only need to do once, navigate to WAF > Policies > Expand the WAF & OWASP Top Threats element and uncheck the SQL Injection protection entity.

Hope this helps someone who might be experiencing the same problem as I have.