-2

[Here is my code]

var pool=mysql.createPool({
    host:'43.138.209.122',
    user:'root',
    password:'xxxxxxxx',
    database:'ltest'
});

Navicat panel

I have never met such problem, please help me!

Hope someone can help me solve my problem! I really need some help! Thank you!!!!

toby
  • 1
  • mysql allows per default only connections via localhost, as exposing the database directly to the internet is a very bad security hazard, if you don't have local the databse, use a REST api to retrieve the data – nbk May 01 '23 at 08:24

1 Answers1

0

It seems like a networking issue. Please check for the following:

  • Ensure that the port is open using nmap.
  • Confirm that there is no firewall blocking the MySQL port.
  • Verify that you can ping the server.

Check this question too ETIMEDOUT error when querying mysql database

Borislav Gizdov
  • 1,323
  • 12
  • 22