0

I have added a mysql cartridge in openshift. I wanted to access the mysql server by a simple codeIgniter application running in my localhost. But I can not connect.

here is configuration of mysql

env | grep MYSQL

OPENSHIFT_MYSQL_DB_PORT=3306
OPENSHIFT_MYSQL_DB_HOST=XXX.XXX.XXX.XXX
OPENSHIFT_MYSQL_DB_PASSWORD=password
OPENSHIFT_MYSQL_DB_USERNAME=userame

And here is my /application/config/database.php

$db['default']['hostname'] = 'XXX.XXX.XXX.XXX';
 $db['default']['username'] = 'password';
 $db['default']['password'] = 'username';
 $db['default']['database'] = 'employees';
 $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;

Am I missing something? Can anyone help me with this? Thanks in advance.

silk_route11
  • 324
  • 3
  • 17
  • possible duplicate of [OpenShift: How to connect to postgresql from my PC](http://stackoverflow.com/questions/20960407/openshift-how-to-connect-to-postgresql-from-my-pc) –  Feb 16 '15 at 17:07
  • Could you please tell us what errors you see when you try to connect? – MartinB Feb 25 '15 at 11:39
  • Is your database name equal to your application name getenv('OPENSHIFT_APP_NAME')? This is the default with OpenShift. So is your allocation name 'employees'? – MartinB Feb 25 '15 at 21:46
  • @silk_route11 Have you found any solution to this problem ? – theapache64 Jul 13 '16 at 06:35

0 Answers0