ERROR 2005 (HY000): Unknown MySQL server host 'localhost' (0)

I setup a new MSQL Server on a new laptop.  I'm trying to import the data dump to the new server and I get the following error:

ERROR 2005 (HY000): Unknown MySQL server host 'localhost' (0)

I'm not sure what is causing this.  Never had this issue before.  Any help would be greatly appreciated.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kerem ERSOYPresidentCommented:

I seems that your MySql Server is not running. Try to start MySQL. You told Laptop but did not mention what os you're using so I cant send you the exact directions on hoe to start and check your MySql server.

Aaron TomoskySD-WAN SimplifiedCommented:
If you are sure the server is running an its on the standard port Sometimes I've seen localhost not work right. Try instead

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Try to add this line to your hosts file:	localhost

Open in new window

Hosts file in linux usually is /etc/hosts, on Windows $WINDOWS_PATH\system32\drivers\etc\hosts (replace $WINDOWS_PATH with path to your Windows folder (usually C:\Windows)).
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

sonicimpulseAuthor Commented:
I'm using windows 7.

I'm not a SQL Administrator in anyway.

Please tell me the name and location of these files you want me to edit.
You should be able to see it in my previous post.

Just in case:
On Windows hosts file is in:  $WINDOWS_PATH\system32\drivers\etc\hosts (replace $WINDOWS_PATH with path to your Windows folder (usually C:\Windows)).

TLDR: C:\Windows\system32\drivers\etc\hosts

This file is like local DNS server. You can find more information anywhere, for example WIKI.
You can try following ways:

* use: localhost or or your computer name
* be sure you're connected to database with password
* set new root password to your mysql server
sonicimpulseAuthor Commented:
I'm completely lost here.  This is all new to me.

I'm using the workbench if that helps.
Read This it's useful for you (i think)

MySQL Refrences
if you use mysql for PHP coding i recommend which you use XAMPP (Apache Friends)

you can download it from here.

also you can use mysql workbench for manage it...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
MySQL Server

From novice to tech pro — start learning today.