CodeIgniter Forums
Connect to host with different port - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forum-28.html)
+--- Forum: CodeIgniter 4 Discussion (https://forum.codeigniter.com/forum-31.html)
+--- Thread: Connect to host with different port (/thread-79561.html)



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;