• <blockquote
    I am installing WordPress under XAMP and WAMP on my local Windows 7 PC. The wp-config contained all the right info but I still couldn’t connect but I could get to the mysql DB from phpmyadmin. I finally fixed it and want to add my experience to this forum for anyone having trouble who have tried all the other solutions with no luck.

    The problem turned out to be my anti-virus/anti-spyware software running on my machine. Even after I had deactivated it I was still having the same problem.

    It turns out that mysql uses TCPIP port 3306 to talk to other WAMP or XAMP components but port 3306 is a popular port that is hijacked by malware and viruses on your computer so the anti-virus software intentionally shuts this port down. I still don’t understand why the phpmyadmin could still gain access to the DB but to solve the problem and get WordPress installed, from the Windows DOS prompt(enter cmd from Start Run) enter command netstat -ano. This will show all processes allocated to port 3306(should be the second column for the port and the last column for the PID). In my case it showed port 3306 was allocated by the PID for mysql and PID 0. PID 0 is Windows or some Windows component. I then went to WIN TaskManager(ctrl+ALT+DEL) and looked under the PID column for both processes and services to find the Process name with that PID(if the PID is not displayed go to the pulldown menu and indicate that you want the PID column displayed). This is just to verify which PID and process/service is allocating the port(that is you can match the PID here to the PID in the netstat -ano report). All this is just to get you thinking of what you can do in case your problem is not exactly as I describe. The bottom line is what ever process or service that is also allocated to the mysql port 3306 you will need to shut that process/service down or modify it in order to get the WordPress install process to talk to the DB on that same port. In my case, my anti-virus software was the prime suspect since however it hooks in to Windows it must do so on a kernel level and would show up as PID 0. I activated my anti-virus software and went into the firewall settings and told it to allow access to port 3306. You may want to leave this port open for uninhibited use while using WordPress on your local machine but when not using WordPress you may want to re-close the port in the Firewall since as I mentioned popular viruses also try to attack your PC from this port. At that point, I closed and re-started my Lamp/Wamp, cleared cache in the browser and re-started the browser. All that re-starting is probably not necessary but in this situation where you tried everything it is not a bad idea to start fresh and take a clean shot at getting the install going. At any rate my install went flawlessly from that point. Anytime you have tried everything and nothing makes sense, if the app uses any TCPIP ports try the netstat -ano and see if you can identify which process or service is blocking you. Sometimes it is anti-virus type software, other times it may be a communication app like Skype too. Good Luck.

  • The topic ‘WordPress under XAMP or WAMP unable to connect to the database on install’ is closed to new replies.