title: How do I do the same thing as with
body: <pre><code>var mongoose = require("mongoose");
  var passportLocalMongoose = require("passport-local-mongoose");
  
  var UserSchema = new mongoose.Schema({
      username: String,
      password: String
  });
  
  UserSchema.plugin(passportLocalMongoose)
  
  module.exports = mongoose.model("User", UserSchema);
  </code></pre>
  
  <hr>
  
  <pre><code>User.register(newUser, req.body.password, function(err, user){
          if(err){
              req.flash("error", err.message);
              return res.render("register");
          }
  </code></pre>
  
  <p>How can I do the same thing but using mySql? Im pretty much new to SQl and converting my work to mySql from mongodb is way harder then i thought even tho SQL syntax is pretty easy. I wanna learn SQL database cuz it seems to be more in demand rn. Can u guys help me out on this one? I just wanna do simple user object and then have a ability to authenticate it using passport library.
  Thanks in advance</p>