Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have a Windows Server 2003 machine with MySQL installed, and a Windows XP client machine. On the client machine we have a C++ application. Windows firewall is active on both machines.

We opened port 3306 on client and server machines for database connection. When we want to check database connectivity from the C++ application, the server responds very slowly. We googled about it and on the MySQL forums someone said that when he opened both ports 3306 and 65000 on the client machine in a similar situation the server responds quickly.

But no one confirms that port 65000 should be opened. We tested port 65000 and our server has started to respond quickly.

What should we do in this situation? Any help will be appreciated.

share|improve this question

1 Answer 1

Not certain this is an answer but it's a bit long for a comment.

It's worth bearing in mind that communication between client and server can happen on different ports at each end. E.g when client.example.com connects to server.example.com on port 3306 it can do so from any port number, such as 65000.

Most dedicated firewalls I've used follow common sense and filter by destination port, but software firewalls running on the client may follow a different set of rules, and it's possible you're restricting the number of connections that the client can initiate.

According to wikipedia, 3306 is in the registered ports range. The "dynamic" port range runs from 49152 to the max of 65535. Perhaps the client is using 3306 outbound just fine but initiates multiple tcp sessions (for example control and data) and doesn't have any free ports to use.

Does it work if you open a different port in the dynamic range? My recommendation would be to configure the client firewall to allow outbound connections on any port to this particular IP address, and only limit the server side.

I would also suggest examining the output of netstat -an on the server, with the client's port open and closed, and see what sessions pop up in each case.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.