Link to home
Start Free TrialLog in
Avatar of Kenny Devorak
Kenny DevorakFlag for United States of America

asked on

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.
Avatar of Kerem ERSOY
Kerem ERSOY

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.
ASKER CERTIFIED SOLUTION
Avatar of Aaron Tomosky
Aaron Tomosky
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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)).
Avatar of Kenny Devorak

ASKER

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 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
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...