Database connection

i have two apps and two site and each site have individual database created when i create site.

  1. site one is and database is :bcad64afbf268a6a

  2. site another one is and database is :4c609e94a99a291b

  3. Hosts file setting are:

  4. site_config.json file for meeting:

    “db_name”: “bcad64afbf268a6a”,
    “db_password”: “l9mONAM3sKoXXwZ6”,
    “developer_mode”: “1”,
    “host_name”: “


  5. site_config.json file for

    “db_name”: “4c609e94a99a291b”,
    “db_password”: “EFXnq6yXTcbFRZzg”,
    “encryption_key”: “MacJk7OrhUVfjaaarV8nWeR08WfGcTmG454k4XVBJtE=”,
    “limits”: {
    “space_usage”: {
    “backup_size”: 220.0,
    “database_size”: 273.21,
    “files_size”: 0.0,
    “total”: 493.21

The problem is both the apps are using site_config.json file of and its database. is create before and is create after one week.

i don’t know why both are using connection and database. actually should use its connection and database.

is there any file connection setting which use for commond use.

please help me

thanks in advance .

Hi @kinzang,

have you created both sites using

bench new-site
bench new-site

The subfolders in ./sites should not mix up in a standard config…

yes, i have created using bench new-site

i am new in frappe as wel in erpnext also… please guide me to solve this issue @lasalesi.

This might sound strange, but how do you know that they are using the same file? What happens if you run

bench mysql --site

Which db is loaded?

thanks @lasalesi,

i have lots of user and data in databases, but in one have default user only and dose not have any data.
so when i brows and used the user of, i can open and display all the data of
And then i changed the database name in site_config.json file of and try to brows both site but is said database error. this shows it is using database.

I am not quite sure if I can follow… If you access, it should open the site from the respective ./sites. And in there, it will load the corresponding db connection. Maybe it helps to check whether the http request arrives properly in the nginx log files. And control your multitenancy configuration (refer to Multitenant Setup · frappe/bench Wiki · GitHub)

thank @lasalesi, i ll try.


Have you enabled multi-tenant setup yet?

bench config dns_multitenant on

sorry for let reply,
yes, it solved by clearing currentsite.txt. it should be empty.