The hostname "localhost" has a special meaning for MySQL, at least on Linux it 
has.
When you ask the mysql driver to connect to localhost, it will use the socket.
To avoid this issue, better use 127.0.0.1.

Also check whether the MySQL server is running on that port (netstat -a ?),
whether the service is up (see services panel),
and whether your Windows Firewall allows connections to it.

Greetings,
Diederik

Op 6 jan. 2013, om 18:28 heeft Александр Соколов <sashkacosmon...@gmail.com> 
het volgende geschreven:

> Hi! Recently I had the same problem and this site has helped me: 
> http://stackoverflow.com/questions/11121819/mysqldb-in-python-cant-connect-to-mysql-server-on-localhost
> I've set the next properties:
>     'ENGINE': 'django.db.backends.mysql', 
>     'NAME': 'yourdbname',                      
>     'USER': 'root',                      
>     'PASSWORD': 'your password',         
>     'HOST': '127.0.0.1',                 
>     'PORT': '3306', 
> 
> Hope, it will help you.
> 
> P.S. By the way in the beginning, I've installed the latest version of 
> MySQLdb. But this is unlikely has been causing of my problem.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/django-users/-/dFs9n5ZCuDEJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to