Deploy my Flask app to Heroku using my own MySQL server - mysql

I have a project with a Flask backend and Vue frontend. I want to deploy it to Heroku but using my own MySQL database from my own MySQL server, without using Heroku's dynos.
Is this possible?

That depends what you mean by
my own MySQL database from my own MySQL server, without using Heroku's dynos
If your MySQL server is accessible from the Internet, sure. Just point your application at it.
(Note that using one of Heroku's database addons does not mean using dynos. These services run as hosted services on the cloud, not on your dynos. JawsDB and ClearDB are both options and both have free tiers.)
If you're talking about something running inside a firewall, e.g. on your laptop, then this won't be possible without doing a bunch of network stuff. It's possible but I strongly urge you not to do this. It's easy to create security issues.

Related

Nodejs application get data from Hostinger Website Mysql database. How do I solve this

My client has a website hosted on hostinger, He has linked me on his hosting. Database is Mysql. It is a ecommerce business website and I need to get some data from the mysql server through my NODEJS Application
It has a remote mysql feature.
I tried using mysql npm library, but i dont know what credentials to put there. I have no clue how to connect to a already hosted mysql database, It has a remote access feature, which I could not use.

How to host my web app on heroku with MySQL database?

As far as I know, while deploying your web application on Heroku (from github) you need to provide a requirement.txt file so that every library which is used can be installed. But you cannot install MySQL like that. I've used python and streamlit to create a web application. I used MySQL to store data. I don't want the local machine's data to be exported but want to store the data when it is deployed as web app and someone fill in the details (it's basically a Student DBMS).
How can I deploy such a web application that uses MySQL on heroku ?
I've read some docs and look around and found that PostgreSQL is more suitable but I want to use MySQL because this is school project.
Heroku has a add-ons called ClearDB for Mysql
https://devcenter.heroku.com/articles/cleardb

AWS API REST connected to external MySQL DB

I made an API REST with Spring boot, connected to an existing MySQL database. This database is not hosted on my local.
The API works fine on my local but I want to deploy it on AWS.
Is it possible to use this remote MySQL database or do I need to use a new one hosted on AWS?
If it is possible, can you guys link any tutorial or documentation? I can't find anything related to this particular issue.
Thank you!
yes, AWS does not limit you to using only their RDS (Relational Database Services) offerings. Configuration of the DB will be the same (or similar if you want to use other instance than one used for your local development) as for your local environment.
Application hosted in aws can be connected to both cloud db and on-perm dB.only thing we need to check is security groups configured in ec2 along with other DB configurations.

Migrating MySQL database from local server to Heroku

I have made a MySQL database on my local server.
I want to port this to Heroku. Would there be any way to do this without using ClearDB? ClearDB asks for account verification, credit card details etc. which I do not want to give. The rest of the application is hosted on Heroku, so I just need to migrate the database.
Would this be possible?
You have at least three options:
There are other Heroku addons that provide MySQL databases. I'm not sure if any of them let you get started without a credit card.
You could use a MySQL provider that's not explicitly supported by Heroku and point your application to it manually.
You could update your application to use PostgreSQL instead of MySQL and use Heroku's own Postgres service.

How do I connect a desktop app to an hosted database

I am developing a desktop app and I want to store data in hosted database like MySQL/MongoDB. I know one solution is using webservice to manipulate db. I am wondering is there a way to connect desktop app with hosted db directly.
I am using OpenShift I know I can use port-forward to do this. But it's unpractical to open port forward every time for every PC. So is a way simply like this:
mongoose.connect('mongodb://user:pass#host:port/db');
I tried this but I got 'connect refused' or 'connect not found' errors. OpenShift doesn't allow external access to database directly because security issues, right? Then how could I do it without port-forward?
Also I read some articles about SSH, is it possible to use SSH to access db directly when desktop app is launched?
Thanks for any suggestion.
I don't think OpenShift is going to be a good fit for what you are trying to do, unless you decide to build a service layer between your desktop app and the database. It sounds like you are looking for a Database As A Service. You mentioned both MongoDB and MySQL. MongoLab is a good MongoDB DBaaS option. For other databases like MySQL, PostgreSQL and several others you could look at Amazon RDS.