# Troubleshooting multi-site databases

**URL:** https://meta.discourse.org/t/troubleshooting-multi-site-databases/48860
**Category:** Support
**Created:** [August 19, 2016, 8:00am UTC](https://meta.discourse.org/t/troubleshooting-multi-site-databases/48860 "2016-08-19T08:00:41Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Hammad\_Abbasi](https://avatars.discourse-cdn.com/v4/letter/h/90db22/32.png) [@Hammad\_Abbasi](https://meta.discourse.org/u/Hammad_Abbasi)
#### Post date: [August 19, 2016, 8:00am UTC](https://meta.discourse.org/t/troubleshooting-multi-site-databases/48860/1 "2016-08-19T08:00:41Z")

</div>

Hi,

I have setup a multi-site up and running however I am unable to create admin or configure notification email for 2nd site  
so i have few questions

How can i configure SiteSettings in app.yml for a) 2nd Site b) ALL SITES

- exec: rails r “SiteSetting.notification\_email=‘’”

I have tried manually connecting to both databases using  
sudo -u postgres psql b\_discourse  
but when i run select \* from users ( it returns nothing )

I tried running “rake admin:create RAILS\_DB=b\_discourse”- but this is creating the user on first site.

I ran “SiteSetting.notification\_email” command in rails console it shows email from 1st Site - is there any way i can switch database in rails console ?

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [August 19, 2016, 8:29am UTC](https://meta.discourse.org/t/troubleshooting-multi-site-databases/48860/2 "2016-08-19T08:29:23Z")

</div>

2 posts were merged into an existing topic: [Creating admin using rake admin:create](https://meta.discourse.org/t/creating-admin-using-rake-admin-create/48615)

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [August 19, 2016, 8:29am UTC](https://meta.discourse.org/t/troubleshooting-multi-site-databases/48860/3 "2016-08-19T08:29:23Z")

</div>


