EllisLab text mark
Advanced Search
     
Unable to connect to database I’m stumped..
Posted: 08 September 2008 12:17 PM   [ Ignore ]
Avatar
Joined: 2008-09-06
91 posts

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.

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

But the database “usr_database” exists!

I don’t understand? mad

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..

 
Posted: 08 September 2008 01:52 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2008-05-30
450 posts

Haha, glad you found the problem! It’s the simple things like that that makes it frustrating smile

 
Posted: 08 September 2008 01:58 PM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Joined: 2008-03-22
31 posts

ehehehhee,,, but that’s ussual… once i’d been 2 days punching my head before I realase was that…

 
Posted: 08 September 2008 04:29 PM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2008-09-06
91 posts

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.

 
Posted: 16 November 2012 10:39 AM   [ Ignore ]   [ # 4 ]   [ Rating: 0 ]
Joined: 2011-04-23
1 posts

Face the same problem. After same time realized that I forgot to change the following line:

$db['default']['username'''

TO

$db['default']['username''root'


What A shame!

 
Posted: 24 November 2012 05:38 AM   [ Ignore ]   [ # 5 ]   [ Rating: 0 ]
Avatar
Joined: 2012-09-20
15 posts

hahahahha