Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var mysql = require("mysql");
- var conn = mysql.createConnection({
- host: "localhost",
- user: "root",
- password: ""
- });
- conn.connect(err => {
- if (err) {
- console.log("Problem with MySQL " + err);
- } else {
- console.log("Connected with database");
- conn.query("CREATE DATABASE db_mahasiswa_uas", (err, result) => {
- if (err) {
- console.log("Error creating database " + err);
- } else {
- console.log("Database created successfully");
- }
- });
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement