If you have your bot and your site in two different projects that won’t work - the MySQL database will only be available on the same project where it’s running.
That said, there’s no reason you can’t have a bot and a website about a bot in the same project and that seems like it’s pretty common. If you arranged things that way then both the bot and the site would have access to the database.
You’re correct, that example isn’t a Node project. What you’d need to do would be to combine the pieces of the lamp-poc project that start the mysql process with the parts of a standard Node project that start the node process running. I don’t know of any examples off the top of my head, but if I come across anything I’ll post it here. I also don’t know of any projects that use phpMyAdmin or similar tools.
Depending on your storage needs something from https://glitch.com/@storage might be more suitable and easier to integrate with.