if your in windows localhost should resolve to 127.0.0.1....there isa file to check to make sure this is true but i forget what it is....also i cant help you if your on linux.....if you want to double check that you have the correct info for connecting to your database go to
www.mysql.com and download the control center and enter the same info in it...if you can connect then its correct info...if not...change it