master databse

is it possible in yii2 to first create master database and store all info of user in master db after login with master db. he got his child db configuration then master db connection stop and child db config connection would be start and how dynamically give me some suggestion for this thing