loading...

Discussion on: How to use MySql database on github.io

Collapse
eruizdechavez profile image
Erick Ruiz de Chavez

As others already mentioned, GitHub pages are focused on serving only static content (browser files: HTML, CSS, JS, images, etc.), and it will not execute any server side code. For most databases, in your case MySQL, you need some server side executed code to connect to a MySQL database, or use a different kind of remote database like Firebase or CouchDB.

If you need a free way to run server side code, Vercel (used to be called Now.sh) is a good alternative and it plays nice with GitHub (auto deploy on push, different urls for each branch, etc.).

As a side note, since you are already working with MySQL, a good alternative could be to use SQLite but it would require a place to store and update the SQLite file 🤔.