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.
sonicimpulseAsked:
Who is Participating?

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

x
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:
hi,

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.

Chhers,
K.
0
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 127.0.0.1 instead
0

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
XzKtoCommented:
Try to add this line to your hosts file:

127.0.0.1	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)).
0
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.
0
XzKtoCommented:
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.
0
re-searcherCommented:
You can try following ways:

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

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

MySQL Refrences
0
re-searcherCommented:
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...
0
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.