title: How change the database user on the controller in Codeigniter4?
body: <p>I'm migrating from codeignter 3 to codeigniter 4 and I'm having a hard time changing the database settings.</p>
  <p>For example: I want the controller &quot;Admin&quot; to access with a configuration / database user and the controller &quot;Site&quot; to access with another.</p>
  <p>I use this as a security issue, I want the &quot;Site&quot; controller to have access only with the query user ...</p>
  <p>In codeigniter 3 I simply added the code at the beginning of the control to change the database as in the example below</p>
  <pre><code>$ this-&gt; db = $ this-&gt; load-&gt; database ('admin', TRUE);
  </code></pre>
  <p>In codeigniter 4 how can I do this?</p>
  <p>I don't want to change the database, I want to change the database user. And choose which user to use on the controller, not the model. For, when I use the admin controller I would like to use the user with access to &quot;insert, delet, selec&quot;. When using the website controller, I would like to use the user who only has access to &quot;select&quot;.</p>
  <p>Thank you</p>