mik3y / django-db-multitenant

A simple multi-tenancy solution for Django apps.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Searching for an invalid database.

Anuj16 opened this issue · comments

My settings.py is something like this:

DATABASES = {
'default': {
'ENGINE': 'db_multitenant.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.

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.

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

Excepted with the PostgreSQL backend!