How to connect to a sql database from a device connected to a different network - database

I am developing an app with a login system in flutter. Using postgresql I can access to an external database located in a raspberry. All works perfect until the network of the device changes. So here are my questions:
How can I access to a database from a device connected to a different network? Is that possible?
If not, how could it be the correct way to do it? or what should I read and/or learn to apply this funcionality?
Thank you.

This question is not Postgres specific.
You connect to servers over TCP/IP protocol using servers IP address or it's FQDN, fully qualified domain name. If your device is mobile and changes network, you can use some dynamic IP service or your own name servers.
Setting up a port forwarding system is also possible.

Related

HOW TO ACCESS ORACLE APEX APPLICATION OVER A LOCAL NETWORK

I just want my ORACLE APEX APPLICATION along with Database installed in PC-1, and then rest of PC's just access this application via LAN cable or Wi-Fi. How can i do it without using any hosting service!?
And also want to know about the ORDS Restful Services
how to configure it for the other client systems and for the server side!?
Thanks in advance!
Oracle Apex doesn't differ to any other wesite from this point of view.
You need to setup Apex/ORDS listeners, and then you can access it from your local network like :
IpOfThePCWhereApexIsInstalled:PortConfiguredWithApex/Apex
for Example
192.178.160.1:443/Apex (if Apex is configured on port 443)
192.178.160.1:80/Apex (if Apex is configured on port 80)
This way, the browser will search for the ip inside your local network and access it.

REMOTE ACCESS FROM ONE PLACE TO ANOTHER MS SQL SERVER

I have try to remote access from one computer to another within LAN connection. However, thru these days research a lot of the article said I need to do port forwarding. But I think in my country ISP has block this setting, I can even find the option in my router webpage.
Is there any other way to remotely access the ms sql server thru internet?
This is networking protocol. But you can do it using Remote Desktop Connection locally as long as you have an access to that particular Server.
Check the Firewall also to your server.
Another option is, you can access it remotely using TEAM VIEWER

how to access database on laptop using api on mobile

I have developed an application using sql anywhere database as back end and powerbuilder as front end. it is working on my laptop very well and i have also used this app on network server (without internet ) using wifi on another laptop. in which the program is installed on that other laptop and it connects database stored on my laptop .
now i want to develop a mobile app which should connect to my laptop and use database stored on it. It should connect the database using WIFI network.
i have knowledge of powerbuild simple programing, SQL and Visual basic. but i dont know any thing about mobile app developing.
Please help me to solve my problem.
This shouldn't be too challenging, it sounds like you want the app to connect to a network (or your laptop) database vs. the client machine like any web application and this shouldn't be a challenge other than making sure you've opened up the proper ports for the database in windows firewall AND/OR if you are on the INTERNET you'll probably need to set up port forwarding on your local router so that the database requests to your laptop from the "internet" get forwarded from your router to your local subnet (network).
So for example mySQL uses port 3306 (I think.. memory?) so you'd need a port forward in your router that forwards incoming 3306 requests to your laptop IP address, mac address, or machine name (better to use machine or mac).
HTH

Accessing network share and SQL Server over the internet?

Currently we have an old application that was written with VB 6. The application accesses SQL server and network share over a local network.
The management wants to make it work over the internet (i.e. someone can install the application locally on their own computer, but still somehow connects to a database/network share that we host. Of course, they want minimal change to the current application.
Exactly what you can do there? I know you can access SQL server over the internet, but is it secure if you use SSL encryption? Also what would be the easiest solution to access a network share?
Thanks

How to connect to a database running on VM?

I got a question here. Seems a little complicated in my mind. Hope I can make myself clear. :)
I have a Win7 system (system A) with a Win7 VM (system B) running on it.
System B is connected to a intranet through VPN to log some realtime data into a local sql server database. Internet connection is disabled by administrator so System B is separated from outside.
Now System A wants to connect to this database and read these realtime data.
Is it possible?
I don't have any experience with vmware, but assuming you can use any VM, here's a solution for VirtualBox:
Setup a network interface on your VM, that's visible to the host
system only (reference):
Host-only networking is another networking mode that was added with
version 2.2 of VirtualBox. It can be thought of as a hybrid between
the bridged and internal networking modes: as with bridged networking,
the virtual machines can talk to each other and the host as if they
were connected through a physical ethernet switch. Similarly, as with
internal networking however, a physical networking interface need not
be present, and the virtual machines cannot talk to the world outside
the host since they are not connected to a physical networking
interface.
Configure port forwarding on system B ([external_port] -> [host_over_vpn]:[service_port])
Connect to [system_B_ip_over_provided_interface]:[external_port] as if you were connecting to the database directly.
yes it is possible. Just give correct IPs.

Resources