I am new to all three Electron Mysql and JS
I was trying to connect to my database "school" with table "student"
Kindly help
Index.js
const electron = require('electron')
const { app, BrowserWindow } = electron
const url = require('url')
const path = require('path')
app.on('ready', _ => {
var mysql = require('mysql')
var connection = mysql.createConnection({
host : 'localhost',
users : 'root',
password: '123456',
database: 'school'
})
connection.connect(function(err) {
if (err) {
console.error('error connecting: ' + err.stack)
return
}
console.log('connected as id ' + connection.threadId)
})
})
Screenshot of Error attached