Hi, if you're using python venv, try install mysqlclient(pip install
mysqlclient) and rerun the local server.

On Thu, Dec 6, 2018, 9:38 AM C. Kirby <mist...@gmail.com wrote:

> 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 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/693cde12-e701-4f4f-8b51-4938fd0f427b%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/693cde12-e701-4f4f-8b51-4938fd0f427b%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAAcYvkzqXECiQAE1QokbADeCqHdgn6Uk0Wq8UpTWjnt%2BoWKyhQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to