Vengat
Vengat

Reputation: 235

Xampp The MySQL server is not running or is blocked by a firewall

I have installed XAMPP 1.8.1 on my machine, and I am able to connect to both the service, and phpmyadmin. Then I tried to change the security, but I faced the issue:

"The MySQL server is not running or is blocked by a firewall! Please check this problem first..."

enter image description here

enter image description here

enter image description here

Upvotes: 3

Views: 10121

Answers (2)

SherylHohman
SherylHohman

Reputation: 17930

If the port is blocked by a firewall you can try adding a Port or Program exception to Windows Firewall Defender as follows:

To add a "Port Exception":

  1. Go to Start -> Run and type firewall.cpl.
    Or
    Go to Start -> Control Panel -> Windows Defender Firewall
    The Windows Defender Firewall window opens.
  2. In the left-hand list, Click on the “Advanced Settings” link.
    The Windows Firewall with Advanced Security Window opens.
  3. Click on the “Inbound Rules” option.
  4. In the left pane, click on “New rule”.
  5. Under “Rule Type” select the option “Port”, and click next.
  6. Select “TCP”and “specific local ports” options.
  7. Key in an appropriate (non-conflicting) port number.
    The default port for MySQL is 3306, Apache is 80, and Skype is 443. You'll need to choose something different.
    Check this list to choose a port number that won't conflict with another program or service running on your computer.
    https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers.

  8. Click Next.

  9. Select the option “Allow the connection”.
  10. Click Next, do not change any option here and click Next again.
  11. Specify a name for this rule, and, if you wish, a description.
  12. Click Finish.

To add a "Program Exception":

  1. Go to Start -> Run and type firewall.cpl.
    Or
    Go to Start -> Control Panel -> Windows Defender Firewall
    The Windows Defender Firewall window opens.
  2. Click on the “Advanced Settings” link on the left pane. The Windows Firewall with Advanced Security UI opens up.
  3. Click on the “Inbound Rules” option.
  4. On the left pane, click on “New rule”.
  5. Under “Rule Type” select the option “Program” and click next.
  6. Select the option “This Program path”.
  7. Browse to the your Program's installation folder, where the .exe file resides
  8. Select the option “Allow the connection”.
  9. Click Next, do not change any option here and click Next again.
  10. Specify a name for this rule, and if you want to, add a description as a reminder.
  11. Click Finish.

Upvotes: 4

pr1nc3
pr1nc3

Reputation: 8348

I am pretty sure you are using skype so your port for xampp is blocked.

  • Close xampp
  • Close skype (completely)
  • Go to your skype-->options--->advanced tab--->connection
  • Uncheck the "use port80 and port 443 for additional ..."
  • restart skype

and you are good to go.

*Maybe you will need a computer restart after you finish all this.

Upvotes: 0

Related Questions