CodeIgniter Forums
Codeigniter not connecting to database - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: Codeigniter not connecting to database (/showthread.php?tid=79281)



Codeigniter not connecting to database - devprecious - 05-22-2021

Hello, Codeigniter not connecting to database. After setting the information in the .env it doesn't throw an error, even if I put in the wrong database details it won't throw an error too. that's making it hard for me to know if the database has connected.

what I did

database.default.hostname = localhost
database.default.database = ci4
database.default.username = root
database.default.password =
database.default.DBDriver = MySQLi
database.default.DBPrefix =


RE: Codeigniter not connecting to database - pippuccio76 - 05-22-2021

(05-22-2021, 03:32 AM)devprecious Wrote: Hello, Codeigniter not connecting to database. After setting the information in the .env it doesn't throw an error, even if I put in the wrong database details it won't throw an error too. that's making it hard for me to know if the database has connected.

what I did

database.default.hostname = localhost
database.default.database = ci4
database.default.username = root
database.default.password =
database.default.DBDriver = MySQLi
database.default.DBPrefix =

see this tread :
https://forum.codeigniter.com/thread-77479.html

 [b][b]John_Beton

[/b]
[/b]
i solved similar problem on server


RE: Codeigniter not connecting to database - devprecious - 05-22-2021

(05-22-2021, 09:55 AM)pippuccio76 Wrote:
(05-22-2021, 03:32 AM)devprecious Wrote: Hello, Codeigniter not connecting to database. After setting the information in the .env it doesn't throw an error, even if I put in the wrong database details it won't throw an error too. that's making it hard for me to know if the database has connected.

what I did

database.default.hostname = localhost
database.default.database = ci4
database.default.username = root
database.default.password =
database.default.DBDriver = MySQLi
database.default.DBPrefix =

see this tread :
https://forum.codeigniter.com/thread-77479.html

 [b][b]John_Beton

[/b]
[/b]
i solved similar problem on server
He wasnt able to fix it too