Forum Moderators: open

Message Too Old, No Replies

Cant connect to mysql from testing server any longer.

Mysql server rejecting my connection

         

scraptoft

8:00 pm on Nov 5, 2006 (gmt 0)

10+ Year Member



When working on my website I connect to my webhosts mysql database from my testing server.

Until this moment I have been able to connect from my testing server to my webhosts mysql server and call the results.

I have made no changes to any of my files when I get the error:

"Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on '<snipped ip>' (10060) in C:\wamp\www\yuh\includes\dbconnect.php on line 18
Can't connect to MySQL server on '<snipped ip>' (10060)"

I contacted my host - they said they have made no changes from their end. I have also tested the connection from a 3rd server which connects fine.

I can only think that it is due to a change or some sort of blocking software from their end as I havn't made any changes to my server.

Has anyone else experienced a problem like this?

[edited by: physics at 4:55 pm (utc) on Nov. 6, 2006]
[edit reason] No specific IPs... for your own protection. [/edit]

physics

4:57 pm on Nov 6, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is your testing server at home? Do you have a firewall?

scraptoft

3:05 am on Nov 7, 2006 (gmt 0)

10+ Year Member



The testing server is at home and no changes what so ever have been made I have no firewall either. (Good job you deleted my i.p!)

I tried testing another of my websites that I used to test from the same testing server - this shares the same mysql database yet no longer works either.

The only reason I can think of is if they have auto-blocking software because I was testing my code alot - however live chat support believe they don't.

Also, thank you for editing the i.p.

jtara

5:17 am on Nov 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



telnet is your friend.

telnet <your ip address> 3306

(Or, in your case, 10060).

What do you see? Do you get a connection and get some garble? If so, you are able to connect to your MySQL server. You have some configuration problem in your MySQL configuration. (Changed password? Deleted user ID?)

If you don't connect, you've got a firewall problem somewhere.

But don't expose your MySQL server on the net like this. Limit MySQL to localhost, and tunnel to it through ssh. Moving the port gives you some protection, but not from a motivated attacker.

scraptoft

12:15 am on Nov 8, 2006 (gmt 0)

10+ Year Member



After 3 days of contacting my host via their support services my entire server went down today. I then recieved an email with the following

"Our admins have checked for any resemblence of rules that may be restricting connections from ips provided above on the mysql sever and have not found any rules that restricting connections from ips provided above."

However it is all back to normal and working fine - as it was.

This isn't the first time a problem has magicly resolved itself without my host finding or fixing it.

Maybe some little elves entered their server room during the night and fixed the problem.

Thanks for your input on trying to solve this guys.