CodeIgniter Forums
Connect to host with different port - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=31)
+--- Thread: Connect to host with different port (/showthread.php?tid=79561)



Connect to host with different port - Suweyd - 07-02-2021

Hi all,
I am using port number 88 and 3308 to connect to my server instead of 80 and 3306 (default ports). the .ENV file allows only to enter hostname, user, password with no option for port. I tried to connect using hostnmae: 127.0.0.1:88 at it failed.

Any help please


RE: Connect to host with different port - includebeer - 07-03-2021

All configuration values can be set in .env. If it’s not already there, you can add it. See http://codeigniter.com/user_guide/database/configuration.html#configuring-with-env-file
For the default group it would be database.default.port = 3308;