Heroku and Databases

Just trying to figure out how to work with databases in Heroku, I see they use a default postgreSQL which I have never used in my life, and would be more comfortable in my normal MySQL which the docs say I need to install cleardb module to have.
Before I start reinventing the wheel is there a default way I could or should be doing this with Heroku?

2 Likes

Do you have structures already in MySQL that you’ll want to move to postgre or is this a new project?

Question: do you need to use Heroku?

It is literally just a testing phase thing, trying to work out if Heroku is a good solution for any of the work i do. Most of my work relies heavily on a database so just wondering how it should be done.

It looks pretty simple like I just install an add-on inside Heroku dashboard itself called JawsDB Maria, I assume after adding the add-on it will give me some access details that i use in wappler.
My concern is I do not want to go ahead and do that if it is not the standard method, Maybe I should just add a database connection in the database manager in wappler ad it adds the add-on by itself or something on deploy.

Just trying to figure out the expected Wappler way as such.

Out of interest I tried to “add-on” the FREE JawsMaria and JawsMySQL and ClearSQL add-ons inside Heroku itself and as soon as you say yes provision the free add-on to this application it says, nope we want your credit card info. Which for testing i am not prepared to do. Something tells me their definition of “free” and my definition of “free” are pretty different.
Can not see why a credit card is needed for a free service unless there are hidden charges if I exceed their allotted 5mb, which for this test is 10 times more than i need anyway.

It uses the JawsDB service rather than Heroku DB. It’s based on AWS RDS. Once setup they will give you connection details:

I agree with you on the credit card thing. I guess it’s to avoid abuse.

1 Like

I just use my prepaid 0€ debit card for those type of things.

2 Likes

Thanks Max, I think for a guy like me I will stick with my trusty old cPanel and FTP for now, it was a fun and fast little test phase, but I need things with pretty low fixed costs as I do a lot of testing on a lot of different things that I will more than likely only ever use use once for that test.

With South African currency being what it is USD5 sounds like a cup of coffee but
Screenshot 2020-06-06 at 14.14.30
I could get this.

@JonL, I am going to look into getting one of those cards here, never even heard of such a thing in my country, we just got colour TV you know, lol

1 Like

Tbf I don’t think I’ve ever had a wimpy although I think they exist here.

I’m working on that roll your own PaaS tutotial at the moment, you should check that out if you already have access to a server.

1 Like

I think for me Max, that would be a life saver, honestly.

Just to give an indication of South Africa, this morning my loaf of bread was stolen by a troop of monkeys and when I went to go buy another I drove up my driveway and had to wait for 3 cows walking past my driveway to get out my house, and by the way, I live in the “City”

2 Likes

Aren’t you UK based? I remember pretty well eating at Wimpy over there when I was a child.

Take into account that it has numbers written all over it. That could be the reason.

1 Like

Yes, although I’ve never been. I don’t think I’m missing out on much

1 Like

Mwahahaha, unreadable in our country, damn numbers.

No Wimpy is not exactly the finest dining experience out I assure you, but it’s a pretty normal breakfast type restaurant to go to in South Africa, I mean I have to wait for a table there pretty often.

2 Likes

@psweb, I had the same concerns as you. I am very familiar with mysql, but not so much with postgresql. I did watch @George’s Zoom video where he discussed it a little, but I still have questions.

For example, the number of connections. In the Free Heroku Postgres option, there is a limit of 20 connections. However, in the JawsDB Maria option that @psweb mentioned, there is a limit of 10 connections.

While I can understand why they ask for a credit card (in case you exceed the limits or need to upgrade), I am not sure if Heroku is a good fit for my projects because there will be times when I have users visiting my site in the thousands and from reading the details, the options are a denial of service on the website or an automatic upgrade to the next level.

That is, if I am understand what they mean by connections. If I have misunderstood, then please correct me.

Concurrent connections. Take into account that connections to a DB may live what? 250ms?

How do you connect to the database on Heroku? Just using the standard postgresSQL set up.