Recommand · December 8, 2021 0

how to connect apache cordova with MySql remotely

I want to connect my app android in apache cordova with a remote database in phpymyadmin in cPanel, I tried with NodeJS but it appears:

 code: 'ER_ACCESS_DENIED_ERROR',
  errno: 1045,
  sqlMessage: "Access denied for user 'progolfa_clubgolf'@'177.225.132.126' (using password: YES)",
  sqlState: '28000',
  fatal: true

Conexion:

var mysql = require('mysql');
var conexion = mysql.createConnection({
    host: '50.28.40.83',
    database: 'progolfa_clubgolf',
    user: 'progolfa_clubgolf',
    password: '******'
});

How else can I connect using NodeJs or some other technology, I am new to mobile development and I have been researching but I don’t understand how to make this connection