![]() |
database related problem - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: database related problem (/showthread.php?tid=40752) |
database related problem - El Forum - 04-18-2011 [eluser]madhobi[/eluser] if I autoload the library in config/autoload.php file it gives the following error. "Unable to connect to your database server using the provided settings. Filename: D:\wamp\www\community\system\database\DB_driver.php Line Number: 124" This is my first php code and also first work with CI. Please anyone can help me. database related problem - El Forum - 04-18-2011 [eluser]toopay[/eluser] Check your database setting, database.php under './application/config/'! Make sure every input (database name, database username and password) valid. database related problem - El Forum - 04-18-2011 [eluser]InsiteFX[/eluser] And also make sure that you create the database first! InsiteFX database related problem - El Forum - 04-18-2011 [eluser]madhobi[/eluser] yes, database name is correct. But I did not mention any username, password. In normal php file I can access the database. Is username and password mandatory? database related problem - El Forum - 04-18-2011 [eluser]John_Betong_002[/eluser] If all else fails then dab this debug test code onto the end of: // ./application/config/database.php Code: // /* database related problem - El Forum - 04-18-2011 [eluser]InsiteFX[/eluser] username and password would be the same that you used to create the database! InsiteFX database related problem - El Forum - 04-18-2011 [eluser]danmontgomery[/eluser] You can set autoinit to FALSE in config/database.php and the connection won't be made untill you call $this->db->initialize(). You would still need to set the username and password in config/database.php, though. database related problem - El Forum - 04-18-2011 [eluser]madhobi[/eluser] Thanks a lot to all. U all are so kind. Problem solved. I made the mistake by empty username and password. thank u again. ![]() |