CodeIgniter Forums
Unable to connect to database I'm stumped.. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Unable to connect to database I'm stumped.. (/showthread.php?tid=11422)



Unable to connect to database I'm stumped.. - El Forum - 09-08-2008

[eluser]phantom-a[/eluser]
I've been creating my web application on localhost on my computer.

Just now I uploaded to my server, create a user and database imported the sql file for the database, changed the database.php config file with the correct user and password.

I get this error when loading my site.


Quote:A Database Error Occurred
Unable to select the specified database: usr_database

But the database "usr_database" exists!

I don't understand? >Sad

Edit:
ah, I forget to add the user to have perms with the database in cpanel. Whoops! :lol:

Well maby someone else will find this thread usefull if they have the same problem..


Unable to connect to database I'm stumped.. - El Forum - 09-08-2008

[eluser]stuffradio[/eluser]
Haha, glad you found the problem! It's the simple things like that that makes it frustrating Smile


Unable to connect to database I'm stumped.. - El Forum - 09-08-2008

[eluser]Tanque[/eluser]
ehehehhee,,, but that's ussual... once i'd been 2 days punching my head before I realase was that...


Unable to connect to database I'm stumped.. - El Forum - 09-08-2008

[eluser]phantom-a[/eluser]
ya I forget about the perms, for my dev I'm using localhost on my windows computer which you don't need to declare any perms for the user and database, so I just totally forgot about it.


Unable to connect to database I'm stumped.. - El Forum - 11-16-2012

[eluser]Unknown[/eluser]
Face the same problem. After same time realized that I forgot to change the following line:

Code:
$db['default']['username'] = '';

TO

Code:
$db['default']['username'] = 'root';


What A shame!


Unable to connect to database I'm stumped.. - El Forum - 11-24-2012

[eluser]ahmed.alsiddig[/eluser]
hahahahha