localhost not work

#1
Hello
when install joomla and use localhost i get this error:
Could not connect to the database. Connector returned number: Could not connect to MySQL
but when use 127.0.0.1 i could install joomla in server.
thanks
 
Top