How to connect and install MySQL Node.js into my game (i used localhost/XAMPP)

Hello. i want to add database into my game, now i’m using MySQL database, has anyone ever used it?, how is it set up? and how to use it?

i installed MySql using Node.js (npm) but have many error when i’m using the ‘connect’ function

I don’t think you can do that in you client side of web game, you can only pass request to the server and let the server side code query the database