Question: I've installed XAMPP on my Windows XP. I started the XAMPP control panel and it shows apache and mysql are running.

When I check the status by going to `localhost/xampp` it shows:

```
mysql : deactivated

```

When I run php files that access the mysql database, it shows the following errors:

```
Warning: mysql_connect() [function.mysql-connect]: [2002] No connection could 
be made because the target machine actively refused it. (trying to connect 
via tcp://localhost:3306) in C:\xampp\htdocs\Elo_algorithm.php on 
line 18

```

I've been through the XAMPP troubleshooting page and FAQ but I don't understand what to do. The XAMPP control panel shows mysql is running, but xampp status shows: `deactivated`.

What is going on here?

Answer: 
OK I got this issue resolved in my case, hopefully will help you too. Problem was system itself. If you run Vista, Win7, win8 you probably have permission issue. Simple go to XAMPP root and find mysql\_start.bat and run it. Immediately after clicking your firewall will appear with message asking for permission. All you have to do is to allow permission (for private networks such a home or work network). 

MySQL database ACTIVATED - and that's what matters ;) 

I hope that helps to all of you who did not get an answer so far. 
Cheers!
i was facing the same problem. I had to run setup-xampp.bat to make it working.
By the way I came across a new WAMP stack called AMPPS. It looks quite easier than XAMP. You should try. <http://www.ampps.com>