CodeIgniter Forums
linking to a MySQL DB in CI4? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9)
+--- Thread: linking to a MySQL DB in CI4? (/showthread.php?tid=77808)



linking to a MySQL DB in CI4? - zoldos - 10-20-2020

I want to create a DB (MySQLl 5.x) and connect it to my CI4 site.  I obviously know how to make the actual database, but not how to link it to CI.  I assume I create some sort of config.php file with my connection details, then include this in my site files.  I'm just not sure about the back end stuff.  Anyone have any pointers?  Thanks!


RE: linking to a MySQL DB in CI4? - InsiteFX - 10-21-2020

You setup the database in app/Config/Database.php Your model will link to it.


RE: linking to a MySQL DB in CI4? - zoldos - 10-21-2020

Okay thanks! Big Grin