1

I have a website, which is powered by an SQLite database (essentially a db file). Sometimes it is required to look at my database from other machines (within the same local network). For that purpose I currently use sqlite-web which provides a mini SQL web viewer into my db file.

Since sqlite-web's functionality is quite limited, I am wondering whether there are ways to let other machines connect to my local db file via normal desktop applications (such as DataGrip). Similar to how one can connect to postgres via jdbc:postgresql://host:port. Or is this not possible with SQLite?

Edit: I would like to limit the access (e.g. via username + password or a generic PIN), as I don't want everyone in the network to be able to connect to my db.

asked Nov 15, 2020 at 15:34
5
  • Did you try this? Commented Nov 15, 2020 at 15:53
  • @Stefanov.sm Yeah, but this only works with files (hence they write "specify a file path to the database file"). As Kevin suggests, if I share the file via a network path, this could work. I guess, I was wondering whether there are ways, which doesn't rely on file paths (and instead "publish" the db via a host+port, maybe SSH). Commented Nov 15, 2020 at 16:06
  • Well, not that I know about. It is a file, right? Commented Nov 15, 2020 at 16:55
  • What I meant is, instead of exposing the file directly, wouldn't it be nice to host the database as a server, and let clients connect to it properly. Commented Nov 15, 2020 at 17:58
  • 1
    Fair enough, but why not use a database server proper? SQLite says "A good rule of thumb is to avoid using SQLite in situations where the same database will be accessed directly (without an intervening application server) and simultaneously from many computers over a network." Commented Nov 15, 2020 at 18:58

1 Answer 1

1

Map the drive and then use the file path of the mapping.

Or use remote desktop to access directly https://support.microsoft.com/en-us/windows/how-to-use-remote-desktop-5fe128d5-8fb1-7a23-3b8a-41e636865e8c

answered Nov 15, 2020 at 15:45
Sign up to request clarification or add additional context in comments.

7 Comments

How would I limit access though? I don't want everyone in the network to be able to connect to my db.
You could password protect so that only you can map the drive in the first place. Using Samba on linux. It can be done on windows too but I dont know the exact process.
Another option is to use ssh or remote desktop to the machine with the database.
Thanks. Do you know any details on what I would need to setup SSH?
What are the operating systems being used?
|

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.