Did you start your mysql process?
On Thursday, December 6, 2018 at 9:33:37 AM UTC-5, Cool Smith wrote:
>
> 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 [email protected].
To post to this group, send email to [email protected].
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/693cde12-e701-4f4f-8b51-4938fd0f427b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.