Is it possible to expose MySql DB as a service on openshift online so that it can be accessed by another server application (outside the openshift infrastructure/cluster)?
Related
I'm trying to deploy a backend rest api on GCP built using Spring Boot. I start VM instance and install MySQL and connect to Spring app there, exporting network to port 8080 and I can access globally. The problem is, it can only be accessed by HTTP, not HTTPS. I read some articles to use App Engine and Cloud SQL but I have no idea how to connect to MySQL that I previously installed in that VM instance. I'm a student so I need to find the cheapest way to do it, can anyone help?
I have already deployed my node app with heroku which is working fine with my local phpmyadmin database but how can i use it without starting mysql on local machine.
OR how to connect my node app deployed in heroku with phpmyadmin(mysql2)
You shouldn't use local MySQL database in the production app which you have deployed in a hosting provider in this case Heroku.
You could create a remote MySQL database resource from providers like db4free.net.
Update your code to use database credentials of the remote database and start using it.
Note Heroku also provides a MySQL service. You could set up your database there too if you need.
I have two services running on kubernetes using kubectl.
1. Tomcat
2. MYSQL
Scenario - Tomcat is external world facing. Hosted tomcat using node port. And MySQL service is backend and hence hosted it using cluster IP (default type).
Tomcat is not able to connect to MySQL. War file which I am using, need JDBC URL for connection.
I am able to connect to MySQL from my instance(master node). but tomcat service is not able to do.
We can do this by providing the service name directly.
Here, For MySQL service I can provide MySQL-middleware-service2(NAme of my MySQL service)
I have working WebAPI in .net core in Docker. I want to deploy this API on AWS EC2 instance with local mysql database working with other web app.
How can I reach this Mysql from inside docker?
Locally I can do it by using my private ip addres in
=> optionsBuilder.UseMySql(#"Server=$my_local_ip;database=db_name;uid=user;pwd=pass;");
Ho to determine which $my_local_ip should I use in order to connect to DB?
But while using the private ip on EC2 I got error while sending request that it can't connect to any MYSQL host.
For MySQL server you generally have to specify the port to connect to, as each instance on the same server uses a different port.
Use --network=host flag while starting the Web API container and use the localhost in you connection string as the host name. This will enable the Docker container to access the host network. Hence you can access MySQL Database from the container.
Note: This is an insecure for running containerized workloads. Click Here to learn more
I am trying to set up production and development environment for my web project hosted at Openshift PAAS.
I should be able to deploy my web application after final tests and changes to Openshift (production environment).
I set my development environment using GITHUB(Since I do not want other people to connect to openshift).
How do they can connect to Openshift MYSQL server hosted at cloud without port forwarding.
It is not possible to connect to the MySQL server that is hosted on your OpenShift application without using port forwarding.