const mysql = require('mysql'); const connection = mysql.createConnection({ host: "localhost", user: "root", password: "", database: "webshop" }) connection.connect(function (err) { if (err) throw err console.log("Connected to database") connection.query("SELECT * FROM user WHERE ID = 1", function (err, result) { if (err) throw err console.log(result) }) })