Today there are some problems using node.js to connect to MySQL remotely. I hope this article can help those novices like me .
The following is the code to connect to the remote database.
The code is right, then I can not connect the goose by Baidu see the need for it to create a new user permissions set
by ALL privileges ON GRANT . To "root" @ "%" IDENTIFIED BY 'password';
this on the right User empowerment is complete.
If it still doesn't work, set up your server security group. Please refer to the attached setting link here.
Tencent Cloud: Tencent Cloud server releases the external port number by setting the security group .
Alibaba Cloud: Talking about cloud server security group functions and usage
Node.js connection to MySQL
Guess you like
Origin blog.csdn.net/weixin_43889562/article/details/98218762
Ranking