How to connect remote MySQL server from digital ocean linux system | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to connect remote MySQL server from digital ocean linux system

Hey I am using mysql node js module to conect remote MySQL server it's work perfectly from my local system but when I try to access the MySQL remote server from digital ocean linux system it's send a error message connection time out how to fix this

16th Mar 2022, 7:35 PM
Ekram Mallick
Ekram Mallick - avatar
5 Answers
+ 4
Ekram Mallick Port should be open and also you need to set inbound and outbound rules for the ip address which will allow you to access database from outside.
17th Mar 2022, 12:43 AM
A͢J
A͢J - avatar
+ 2
since it says time out its propably because of closed ports
16th Mar 2022, 7:39 PM
Toni Isotalo
Toni Isotalo - avatar
+ 2
Ok. I think you may want to check that the mysql remote port is open and so usable to the other server since the request timed out, I dont think it never even reaches the mysql server. although its never a good idea to connect to databases remotely
16th Mar 2022, 7:49 PM
Toni Isotalo
Toni Isotalo - avatar
0
Toni this MySQL server is hosted in different hosting I want to connect it from my digital ocean linux system with node js
16th Mar 2022, 7:42 PM
Ekram Mallick
Ekram Mallick - avatar
0
Bro I think you don't get it I clearly mentioned that I am able to connect the MySQL server from my local environment but when I try to access it from a linux system then the problem occurs I used the same node js code and module
16th Mar 2022, 7:57 PM
Ekram Mallick
Ekram Mallick - avatar