Link to home
Start Free TrialLog in
Avatar of antum
antum

asked on

How to build an exception in firewall for mysql to run

Hi,

I previously raised this question: https://www.experts-exchange.com/questions/21734009/Using-old-data-dir-in-new-installation.html

I was basically having trouble getting php to login to mysql server. The answer was to turn off the firewall.

So now I need to know how I can allow mysql + apache/php to run with the firewall going?

I am running windows xp pro 2003 with all the latest security patches etc..
I've tried allowing port 3306 for inbound and outbound traffic but I don't really understand what I am doing.

Thanks for your help,
:Ant
Avatar of campbelc
campbelc

Basically you just need to open the 3306/tcp

You can run this from the command prompt:

netsh firewall add portopening TCP 3306 MySQL ENABLE ALL

To interpret: add this to the firewall config opening TCP, port 3306 name it MySQL, enable it, all profiles.


Article on security best practices:
http://www.microsoft.com/smallbusiness/support/security-toolkit-pdf.mspx

TCPView: TCPView is a Windows program that will show you detailed listings of all TCP and UDP endpoints on your system, including the local and remote addresses and state of TCP connections.

http://www.sysinternals.com/Utilities/TcpView.html
Avatar of antum

ASKER

Hi,

Thanks for your reply.. I ran the command and it said "Ok." but it still didn't fix my problem..
I still can't get php to connect to mysql unless I turn the firewall off...

I can c:\telnet localhost 3306 and it tells me the version of the mysql server, so that should mean that I'm working with the right port..

Oh.. I just got it working with the firewall..
I changed the Apache.exe to be allowed to access the internet.... and it worked.. so how do I get it to work without apache accessing the internet?

I'm reading that security best practices report.. thanks..

ASKER CERTIFIED SOLUTION
Avatar of campbelc
campbelc

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of antum

ASKER

Thanks you've answered my question but I'm now having this really annoying problem of Apache crashing.

If you want some more points go here:
https://www.experts-exchange.com/questions/21735390/Apache-'crashes'-on-submit-form.html