I am working on a backend system.
Basically, every user needs to log into the backend from my website. Each user will have their own unique mysql database, and upon authentication, they can access this database.
So theoretically, DB1 Authenticates all users and sets access to their unique database.
DB1 will continue to check that user is authenticated as they browse through the user area.
DB2 will contain all the user data which they get access to if DB1 has authenticated them to this database.
DB1 – lists all usernames and points to the DB2 (or which ever DB is set to the user) to then authenticate the user.
DB2 – Authenticates user and contains all user data
I hope this makes sense? What do you think is the best way to achieve this, I am guessing option 2? Or is there a better way?