External mysql database POST and GET

Hi, I would like to create a miles system for my airline. At the end of every flight i’d run something like !miles in the chat and it would give everyone who is in the server at that moment an x amount of miles. I know I can save it to a datastore, but I’d like to display it through a discord bot and/or website.

My question is, how would I save it to a database like MySQL but also receive information from that database to display it on the in-experience leaderboard next to someone’s name.

I have no idea where to start and could not find it online, hope someone could help me out. Just with the connection to MySQL would already help a lot! Thanks in advance.

You need a server that can receive http requests and store that info somewhere. Probably the easiest way setup wise would be to rent a very basic linux server from e.g. digital ocean.