I'm creating a NodeJS application running on localhost:3000
. I'm also trying to make a mySQL connection on my Synology NAS using the following code:
var mysql = require('mysql');
var connection = mysql.createConnection({
host : '192.168.1.17',
port : 3306,
user : 'root',
password : 'password'
});
connection.connect( function(err) {
if (err)
console.log(err);
else
console.log('connected');
});
Unfortunately the console keeps displaying an error.
ER_ACCESS_DENIED_ERROR: Access denied for user 'root'@'192.168.1.15'
The strange thing here is that I'm trying to make a connection to my NAS station on 192.168.1.17
, but the console says the host is .15
. Can someone explain me why?
I've also Googled this issue, but the solution of granting privileges for the root user from this stack topic doesn't seem to work.
Someone can help me out here?