Another reason for your localhost being unavailable is that it may be blocked for direct communication by some third party applications or software you previously had installed. It is especially possible with cracked applications you use and blocked to avoid connecting to the net and local resources.
If this is the case with you then go and find your hosts file:
For Windows 7 – C:\Windows\System32\drivers\etc
1. Open it with Notepad or another word or HTML editor
2. Find the line or lines that uses localhost phrase
It should be something like this – 0.0.0.0 localhost
3. Delete the entire line.
4. Save the file.
5. Access localhost/phpmyadmin again via your browser.