Using SQL in a Repl

How do I use MySQL (or any SQL thing you recommend) in a Repl? I’m using Node.js

I would recommend finding a library on NPM and then installing it. The libraries differ when you’re using different databases, so for MySQL I would recommend using the mysql library. Just install it through npm or Replit’s Packages section in the editor, and start using it!

If you mean hosting MySQL, you’d have to host it somewhere else. I don’t think a repl has enough power to run it. If you really want to use SQL in a repl, buy Replit’s PostgreSQL hosting.

1 Like