mik3y / django-db-multitenant

A simple multi-tenancy solution for Django apps.
Other
155 stars 34 forks source link

Searching for an invalid database. #2

Closed Anuj16 closed 7 years ago

Anuj16 commented 10 years ago

My settings.py is something like this:

DATABASES = { 'default': { 'ENGINE': 'dbmultitenant.db.backends.mysql', 'NAME': 'test', 'USER': '****', 'PASSWORD': '_', 'HOST': '/Applications/MAMP/tmp/mysql/mysql.sock', 'PORT': '3306', } }

But its giving me the error "OperationalError at /admin/ (1049, "Unknown database 'tenant-localhost'")"

I guess it should search for the "test" database, but its not. Can you guys please guide me to right direction.Thanks in advance.

mik3y commented 10 years ago

It sounds like your mapper is resolving to use the database test-localhost.

The database given in settings.DATABASE is never actually used; only its credentials are used.

stephane commented 7 years ago

@mik3y I think this issue could be closed...

stephane commented 7 years ago

Excepted with the PostgreSQL backend!