0

I am not sure if the terms I am using are correct so ask for clarification if you need :).

Anyways, I am hosting through HostEasySolutions (Server A). It comes with a MySql database, using PHPMyAdmin as the frontend. On Server A, I added some PHP files to access the database, and it works fine.

If I copy the php files to my other server, through DreamHost (Server B), I cannot connect to the database. I get the error: Can't connect to MySQL server on 'combinedsystems.ca' (110)

In the cPanel on Server A, I added the IP for Server B into the Remote Database Access Hosts, I also just added the wildcard '%', just to see if I could get it working...but still it can't find the server.

I am not sure what is going on, as far as I can see there is no firewall.

The only thing that stands out to me, is that if I go to PHPmyAdmin for Server A, it says Server: Localhost via UNIX socket, where as for Server B's PHPMyAdmin, it says: Server: mysql.pdem.info via TCP/IP

1
  • 1
    Please be aware that tags are not keywords. That is, stuffing the tag list full of the same words you're using in your question title or body does not help categorize the question. Select your tags with care. Commented Sep 10, 2012 at 2:52

1 Answer 1

1

Most (all?) hosting companies have port 3306 closed on the firewall.

What you need to do:

  • adding remote database access in the database
  • edit my.cnf to listen on all interfaces. Default mysql listens only to localhost

most of the time you are out of luck! Even if there is no firewall (would be very unsecure) you have no access to my.cnf

Sign up to request clarification or add additional context in comments.

7 Comments

Im confused. You are saying there is nothing i can do? As far as i can see from the control panel, i have no control over a firewall
There may well be nothing you can do. Shared hosting usually considers external access to database servers to be a huge security risk. Your best bet is to contact HostEasySolutions tech support with this problem.
@Catcall yeah, I have tried that. Hopefully they will get back to me early this week. What is the good of having a database if you can't access it from a local program (like c# or java)...I guess if you just need it for your website. Thanks! I will just move the database over to MY server for now, since I know I can connect to thatone
@Toadums: If you can access your database on a shared server from a local program, then every hacker on the planet can also access your database. On a shared host, the database server almost always listens for connections from a single, trusted source. That trusted source is not us; it's another one of the hosting provider's secured servers. Run your code on that secured server, and the database server will listen to you.
@Catcall ok ya, cause to access my database, I use the server mysql.pdem.info, whereas my server is pdem.info...is this what you mean? mysql.pdem.info is different from pdem.info? If this is the case, I don't believe Server A has one of these secured servers, so I am out of luck? :)
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.