Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

587
Views
ER_ACCESS_DENIED_ERROR: Access denied on nodeJS

MySQL is connecting to a different unknown IP when trying to connect. Code Below:

.env

MYSQL_HOST=domain.example.com
MYSQL_USER=****
MYSQL_PASSWORD=****
MYSQL_DB=****
MYSQL_PORT=3306

connection.js

const mysql = require("mysql");

exports.pool = mysql.createPool({
  connectionLimit: 10,
  host: process.env.MYSQL_HOST,
  port: process.env.MYSQL_PORT,
  user: process.env.MYSQL_USER,
  password: process.env.MYSQL_PASSWORD,
  database: process.env.MYSQL_DB,
});

controller/cron

pool.getConnection((err, connection) => {
        if (err) {
          console.log("ERROR: ", err);
        } else { ... insert data .... }
});

With this i'm getting error:

try connecting to remote mysql...
Error:  Error: ER_ACCESS_DENIED_ERROR: Access denied for user '****'@'112.200.198.66' (using password: YES)

Tested in MySQL Workbench and successfully connected. I'm just curious where the IP came from when the public IP of that domain is different. Also tried using the IP instead to connect and still giving me the same error.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

If you're using MySQL 8 the issue could be that the Node mysql driver uses a different authentication plugin - see Node.js can't authenticate to MySQL 8.0

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!