• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] Unable to connect to your database server using the provided settings. -- In CentOS Server

#1
[eluser]rochellecanale[/eluser]
Hello guys just need a little help. My problem is I can't open my web project in CentOS server. I configure my database.php and config.php and set the proper URL's. Here's my configuration.

In config.php
Code:
$config['base_url']= 'http://122.52.126.238/eMLM/';

In database.php
Code:
$active_group = 'default';
$active_record = TRUE;

$db['default']['hostname'] = '122.52.126.238';
$db['default']['username'] = 'root';
$db['default']['password'] = '';
$db['default']['database'] = 'emlmproj';
$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;

So where's my error?
Whenever i try to access my page in 122.52.126.238/eMLM
it shows the error.

#2
[eluser]rochellecanale[/eluser]
Ok i figured what's my problem. I shoul set the $db['default']['hostname'] = '122.52.126.238'; to $db['default']['hostname'] = '127.0.0.1';


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.