Connect To Db With Login Name & Password

Hi,

I’m new to Yii and I need help.

In my app I need user to connect to database with login name & password.

I.e. I need that params config\main.php -> components/db/username and password were empty and only at the moment when the user login app will specify username & password for database. And accordingly, if he is registered in the database, the login is successful, if not, then no.

Could anyone tel me how to do that?

Please, help me and sorry for my poor English and I hope you can understand me.

see this tutorial Multiple Database Connection

That’s not exactly the thing I need, but thank you anyway for your response))

Why a single db-account for your web-application is not enough, like every cms-system?

You really need a different account on the db-server for each user to access the database (with different access-rights for view,insert,delete,grant…)?