title: One website - multiple database
body: <p>We have multiple masters that are synced into a slave. We have decided to create a database for each master (let say MDB0001; MDB0002; MDB0003, etc...). This will allow to not corrupt the entire database if one replication fails or has corrupted data... The slave is used to show information to the people that are on the web (the master is only available in the local network)</p>
  
  <p>The purpose is: we want to have a website (in php) on the server (slave) that shows the content for each database depending who is logged in. So if the user  MDB0001 is connected, we have to read the data from the database MDB0001. </p>
  
  <p>How can this be done? Is it a good way to do that? Or, do I have to duplicate the website for each database?</p>
  
  <p>I hope I'm clear in my explanation. Thanks</p>