Hi everyone,

I am new to Django. I have started a new project running on my localhost. 
Rather than using the default sqlite database, I changed it to mysql with 
the following settings on MacOS High Sierra v13.10.6:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'mysql',
        'USER': 'root',
        'PASSWORD': 'root',
        'HOST': '',
        'PORT': '5432'
    }
}

Enter code here...

When I run the server using the 
python manage.py runserver

command, I get an error:
django.db.utils.OperationalError: (2002, "Can't connect to local MySQL 
server through socket '/tmp/mysql.sock' (2)")

Does anyone know the cause of this error and tell me how to fix it? Thank 
you in advance.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f1386271-01f7-4909-887a-f7efa008bcef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to