Jump to content

Server Hoster not allowing DB connections


'LinKin

Recommended Posts

Hello,

I had a dilema whether post this on Hosting Solutions section or here, I've decided here is better.

So, today when I was sharing a script with someone who hosts his server in someHost, and I found out that his server was not able to connect to my database remotely. So he decided to buy another server from anotherHost and I found out that this time it was working, so the server was connecting normally to the database.

Later on, I found another guy who hosts his server at someHost too, and I could verify that the 'problem' was coming from the hosting company.

Do you guys know why this happen? I'm thinking to e-mail someHost and ask them why this happens.

I've this script working in other 3 servers, and it works normally.

Link to comment

You cannot connect to a database if it is remotely hosted for security reasons. You are, however, able to make an exception in the server settings. There is a cPanel extension (unless it comes by default) for remote access management, where you can add exceptions for specific IP addresses. I've used this feature many times before to allow my server have direct access to web panel. Not all hosts come with cPanel though, so you will have to define that in the server settings. In case you are not able to alter the server settings then you will have to start a support ticket in order to get the host do that for you. Most paid hosts allow remote access if you just ask them. Confirm this in their FAQ/rules/ToS page to find out if they disallow such action - they might actually drop your account for not complying to the ToS, has happened to me before (got that fixed up later on without extra cost - was not my fault anyway).

Free hosts rarely allow remote access because of obvious reasons, there are some I guess, but that's quite rare and they might have limitations on everything else you might need.

Remote access depends totally on the host though - some companies have lesser protection and security features up than some, and for that reason some hosts may not like remote access for their own safety. Besides you could potentially run your own SQL hosting if you just gave access to specific IP addresses, and without authorization it is disallowed everywhere and that will cause financial loss for the company big time - which may end up with you getting sued and they take all your money away.

The best way to know if they allow remote access is to read their help sections, or just ask them directly via a support ticket - they will give you an answer.

Link to comment

It may have a restriction on how many IP addresses can remotely access the database; or how many connections are allowed simultaneously.

Also make sure your server is able to connect to the server itself by pinging it.

You should also verify that your connection settings are the same as on your three other servers.

Link to comment

The server can connect itself. Well what's kinda wierd is that I didn't use localhost to connect but instead I used the VPS's IP.

As for the server settings, but sure how to check them. I've e-mailed someHost but still don't get reply (as expected).

I think the problem is coming from them.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...