This is because you have not set up MySQL correctly. A detailed guide can be found here:
Make certain you have the root user defined to use a % host and not localhost.
Also, make sure you have the MySQL service started in:
Start > Control Panel > Administrative Tools > Services
If the service is already started, try stopping and restarting it.
