Forums

Cannot connect to MySql database

I am following the tutorial for flask websites just to make sure I can get it to work. Everything was looking good till I tried to connect to the database created from the bash terminal. I have tried clicking on the database and accessing it from the terminal but I always get the message: "ERROR 2026 (HY000): SSL connection error: unknown error number Console closed".

I saw where someone said to upgrade MySql. My python version is 3.8 and the image version is fishnchips. Is that the solution still? How would I do that if it is?

What command are you using to connect to the database from the console?

The app works even though I cannot connect to the database from the database link on the dashboard or my bash terminal. Would like to know why but it's a free account, I'll continue with the second part of the tutorial.

I think that you need to upgrade your system image to a more recent one; fishnchips is quite an old image, and it doesn't have MySQL libraries that are compatible with the most recent versions of the MySQL server -- my guess is that you created the account a long time ago (hence the older system image) but only recently created your MySQL server (so it's using the latest version).