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
If you’re determined to try to get it to work inside a Glitch project, here’s a starting point …