Question

I spent the whole yesterday migrating my django application to OpenShift (I selected the free solution and my application is using one small gear). My application is now up and running and there are no issues visiting the site using a browser.

However I have a .NET (C#) application which accompanies the web application and it will be run by many different users and it needs to access the database but I can not find a way to do this in OpenShift.

All the different IP addresses seems to be local and I can not find a way to access the MySQL database remotely. Below are the environment variables from OpenShift:

env | grep MYSQL
OPENSHIFT_MYSQL_DIR=/var/lib/openshift/.../mysql/
OPENSHIFT_MYSQL_DB_PORT=3306
OPENSHIFT_MYSQL_DB_HOST=127.13.169.130
OPENSHIFT_MYSQL_DB_PASSWORD=...
OPENSHIFT_MYSQL_IDENT=redhat:mysql:5.5:0.2.9
OPENSHIFT_MYSQL_DB_USERNAME=...
OPENSHIFT_MYSQL_DB_SOCKET=/var/lib/openshift/.../mysql//socket/mysql.sock
OPENSHIFT_MYSQL_DB_URL=mysql://..-...@127.13.169.130:3306/
OPENSHIFT_MYSQL_DB_LOG_DIR=/var/lib/openshift/.../mysql//log/
OPENSHIFT_MYSQL_LD_LIBRARY_PATH_ELEMENT=/opt/rh/mysql55/root/usr/lib64

As explained in the title I am not looking for the port forwarding solution. (I need to make it work not only for me but all the users)

  • What am I missing?
  • Why can't databases be accessed externally?
  • What should I do?
  • Are there any other FREE paas out there which offer what I am looking for?
  • Do I need to get a medium or big gear in order for this to work?

Thanks

Was it helpful?

Solution 2

OK, lots of googleing and I now know that using the free solution provided by OpenShift it is not possible to solve this issue. You must upgrade to a paid version in order to get another port to access the sql database directly.

OTHER TIPS

If you don't want to use port forwarding, then I would suggest you write an API that your .NET application can use to access the database. Otherwise you would want to look into an externally hosted database (DBaaS) solution.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top