Welcome Guest, Not a member yet? Register   Sign In
Unable to select the specified database
#1

[eluser]Unknown[/eluser]
Hello,

Good morning / good evening (whatever is applicable) to all of you! I'm both a newbie to this site and Code Igniter as well. First of all I would like to thank the authors of CI, the members of this forum, and all the contributors. Using CI made my coding life much much easier! Anyway, could you kindly help me with the issue I'm facing now? Here's the description: I have developed a web application using CI 2.0.1 on my computer. I run it locally using wampserver. After everything was finished I thought of uploading it to the web hosting service I have subscribed to. The problem is that I cannot seem to make the application connect to the database, here's the error message being thrown back at me:

Quote:A Database Error Occurred

Unable to select the specified database: mydb

Filename: core/Loader.php

Line Number: 232

I verified that the myslq database is existing in the webhost server, and my connection details (I guess) are correct. Here are the settings on the database.php file:

Code:
$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'myuser';
$db['default']['password'] = 'mypass';
$db['default']['database'] = 'mydb';
$db['default']['dbdriver'] = 'mysql';
$db['default']['dbprefix'] = '';
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = TRUE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = '';
$db['default']['char_set'] = 'utf8';
$db['default']['dbcollat'] = 'utf8_general_ci';
$db['default']['swap_pre'] = '';
$db['default']['autoinit'] = TRUE;
$db['default']['stricton'] = FALSE;

I do not encounter this on the development environment (my computer running on wampserver). Thank you so much in advance to anybody who would offer me assistance :-)




Theme © iAndrew 2016 - Forum software by © MyBB