Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hello,
Are you using the new DigitalOcean Managed MySQL service? If so you might have to create a new user with authentication type mysql_native_password or alter your doadmin user so that it does not use zcaching_sha2_passwordz but mysql_native_password. That way your node should be able to connect to the MySQL database.
You can take a look at this answer here on how to do that:
Also, I would recommend testing if you could connect from your backend droplet to your MySQL server using telnet:
telnet (^)mysql_server_ip(^) (^)mysql_port(^)
If the telnet command connects you fine, then it is not an issue with your firewall, so I would recommend that you share your config files here so that I could advise you further.
Regards, Bobby
The issues that are being encountered are common when setting up separate frontend and backend servers and trying to connect them to a MySQL database. Let’s break down the problems and the steps to resolve them.
This error typically occurs when the MySQL server is using a newer authentication protocol that the Sequelize or MySQL client library does not support. This is common with MySQL 8.0, which uses caching_sha2_password by default.
Upgrade Your MySQL Client:
caching_sha2_password authentication plugin.mysql2 package:npm install mysql2@latest
Change MySQL User Authentication Method:
mysql_native_password, which is compatible with older clients.Run these commands in your MySQL server:
ALTER USER 'your_username'@'%' IDENTIFIED WITH mysql_native_password BY 'your_password';
FLUSH PRIVILEGES;
Replace your_username and your_password with your actual MySQL username and password.
Check Sequelize Configuration:
This error usually occurs when the Vue.js frontend cannot reach the backend server. The causes can include:
localhost.Check if the Backend Server is Running:
You can check which ports are being listened to with:
sudo netstat -tuln | grep LISTEN
Bind Backend Server to All Interfaces:
0.0.0.0 rather than 127.0.0.1 so it can accept connections from external IPs.Example for Express.js:
app.listen(3000, '0.0.0.0', () => {
console.log('Server is running on port 3000');
});
Firewall and Security Groups:
ufw to open the port:sudo ufw allow 3000/tcp
Cross-Origin Resource Sharing (CORS):
Example for Express.js:
const cors = require('cors');
app.use(cors());
Testing with Postman:
ERR_CONNECTION_REFUSED, check if the backend service is running and reachable from the Postman client (which might be running on your local machine).0.0.0.0) so that it can accept connections from external IPs.Once you’ve gone through these steps, your Vue.js application should be able to communicate with your backend, and Postman should be able to successfully send requests to your backend API.