I am trying to connect external database using MySQL npm. I added possible IPs in remote access whitelist. But when I run connection function, wix change my IP and “Access Denied” error shows.
Here is the code that I am trying…
const mysql = require ( ‘mysql’ );
var connection = mysql . createConnection ({
host : “host_Name” ,
user : “database_User” ,
password : “user_Password” ,
database : “database_Name” ,
port : 3306
});
connection . connect ( function ( err ) {
if ( err ) {
console . error ( 'error connecting: ’ + err . stack );
return ;
}
console . log ( 'connected as id ’ + connection . threadId );
});
Here is the error…
Error: ER_ACCESS_DENIED_ERROR: Access denied for user ‘database_User’@‘35.221.59.48’ (using password: YES).