please search for how to access your sql on gcp with ssh and with IP
addr... then
repace the following setting using that IP...
from:
'HOST': '/cloudsql/instance:us-central1:project',
to
'HOST': 'xx.xx.xx.xx',


On Sat, Aug 10, 2019 at 6:38 AM Solomon Mbak <solomonm...@gmail.com> wrote:

> Hi.
>
> For two days I have been stuck on deploying my Django app on Google App
> Engine. I cloned the project from my Github account. I have installed the
> requirements also.
>
> The database in-use is a mysql database
>
> I get an error that says "django.db.utils.OperationalError: (2002, 'Can\'t
> connect to local MySQL server through socket
> \'/cloudsql/instance:us-central1:project_name\' (2 "No such file or
> directory")')".
>
> I have tried all I can and haven't really found any solutions online.
> My database connection looks like this:
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.mysql',
> 'HOST': '/cloudsql/instance:us-central1:project',
> 'USER': 'root',
> 'PASSWORD': 'password',
> 'NAME': 'db_name',
> }
> }
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/2e58e307-8490-478f-a8cf-4cf640fde5bc%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/2e58e307-8490-478f-a8cf-4cf640fde5bc%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHGmjWXvh5-TZCn4%3D6A-BzehFDM8ZM3CssaTS5%3D6kXqX9xipPg%40mail.gmail.com.

Reply via email to