How do I identify MySQL server address when using mono on openshift?
Question
Is there a way to enter a value in web.config that would always evaluate to the correct IP/adrress when using .NET/mono on OpenShift? if I connect with SSH I can see value of variable $OPENSHIFT_MYSQL_DB_HOST but I dont know how to get that value from mono?
Solution
I could get system variable with var mysql = System.Environment.GetEnvironmentVariable("OPENSHIFT_MYSQL_DB_HOST");
but due to some problems with connection builder object I just wrote the IP address of the host in web.config.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow