I am very new to digital ocean and also Linux VMs, I am helping a colleague who would like to access a database, the original person who created the site/database etc, is no longer around.
I have so far managed to get into the vm and find all the code for the website, but I am at a loss on how we can actually connect to the database, there are a couple of changes they would like to make which could easily be done with access to the database.
The application is an ASPNET application and in the settings file, I have the connection string,
“User ID=adi_net;Password=*********;Server=localhost;Port=5432;Database=adi_net3;Integrated Security=true;Pooling=true;”
How is the best way to connect to this database? I have sqlworkbench installed on my own machine, is there a way to connect to it from this?
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.
You can connect to the Database from the Droplet itself.
First, see what Database it’s being used(it’s not that essential but it’s good to know for future use). To see that, SSH to the Droplet and type in:
What running on that port should be the DB.
Now, in order to connect to it with SQLworkbench, you need to allow your IP address to access this port - 5432.
If you are using UFW, here is the command:
If you are using IPTABLES, the command is:
In both commands, you’ll need to replace XXX.XXX.XXX.XXX with your actual IP address you are connecting from.