B4J Question How to query Sqlite on my VPS

moster67

Expert
Licensed User
I have set up a website on my VPS (running Ubuntu with a B4JServer). For this test-project, I used Sqlite.
Normally I use DB Browser for Sqlite but that means I must download the DB locally and then open it. To do that, I must stop the server which I prefer not to do...
Thus, I am wondering if it is possible to query the Sqlite datebase from a shell?
Thanks.
 

MarkusR

Well-Known Member
Licensed User
install db browser for linux and use remote desktop at pc or tablet or phone.

or output the data as html. the jetty web server examples already have this. should be little effort.
 

moster67

Expert
Licensed User
Thanks @MarkusR. Good suggestions.

install db browser for linux and use remote desktop at pc or tablet or phone.
I did not install a GUI so I consult the server only using SSH/Shell.

or output the data as html. the jetty web server examples already have this. should be little effort.
That is a cool idea. I could write my own apis for most common requirements.

I also found this which I might be able to use:
https://www.phpliteadmin.org/
It is web-based.
 

inakigarm

Well-Known Member
Licensed User
I have set up a website on my VPS (running Ubuntu with a B4JServer). For this test-project, I used Sqlite.
Normally I use DB Browser for Sqlite but that means I must download the DB locally and then open it. To do that, I must stop the server which I prefer not to do...
Thus, I am wondering if it is possible to query the Sqlite datebase from a shell?
Thanks.
You can install jRDC2 on the server and query with B4X clients (even Update, Insert, Delete tables/registers etc..)
 

wl

Well-Known Member
Licensed User
What I did was install Caddy as a reverse proxy that also hosts PHP pages and run phpliteadmin to do remote management.
Caddy thus hosts phpliteadmin, but also acts as a revrse proxy (with let's encrypt SSL) to Jetty applications in B4J.

You can also use the (commercial) Navicat suite that can connect to sqlite through a tunnel (php page as well). Works very well (has much more functionality than phpliteadmin) but comes at a cost of 59 USD (or plus depending on your situation). See: https://www.navicat.com/en/store/navicat-essentials
 
Top