Need to use MySQL

I love using SQLITE, but I need to develop on glitch, then host a production version of the app on heroku (for reasons beyond my control). Heroku specifically does not allow SQLITE - only MySQL or Postgres.

I’d like to develop against MySQL on Glitch mainly so I don’t have to switch SQL syntax between development and production.

I know mysqld is in the Glitch container - is there a reason why it can’t be used ? Or has anyone got it working so I can use mysql on the command line ?


Hi @dougmaloney,

Glitch support recommend connecting to an external MySQL database, due to limitations of the Glitch project container (external ports, disk, cpu, memory, uptime).

Finding an external MySQL database that allows incoming external connections can be a challenge :slight_smile:

If you’re determined to try to get it to work inside a Glitch project, here’s a starting point …

1 Like

excellent. thank you - exactly what I needed.

Hello… I believe I have have a django app running with mysql running as well…

I have a like this…

.mysql/ &
python3 runserver &

…but… how do I now know what user and port to use etc…? So that I can connect my django app to it and then migrate the data into it, rather than sqlite …

I’m assuming this a more robust way of working…

Ah. It seems I don’t think I do have mysql running… which leads onto my next question …

How do I get mysql running, then know the connection string.



Hi @everythingability! Getting mysql started can be a bit tricky — there’s a topic here that dives into it a little bit.

It might also be helpful to remix lamp-poc and build from that — it’s got a .mysql directory you can explore to see how to get things working.

Let us know if that works for you!

Thanks Angelo… I’ll do that…

I’m a bit unclear how new projects work… are they not all the same? How come that has mysql and others don’t/might?

I tend to start from github so I can make changes locally and then update glitch.

Would I still be able to do this (I’m making Django apps)…

Again, thanks.

This would be because Glitch has different app types it will auto detect at times, you could change the project types it detects.

More Info:!/glitch-docs and

Ahhh… I wondered how the hell it worked that I added a Django app and it just worked… I was astonished…

Docs like this need more widely sharing on the site… with LOTS of examples and code fragments…

Thank you very much.

I am making an unoffical Glitch docs repo