G+_Jason Perry Posted December 17, 2016 Share Posted December 17, 2016 I want to know what's in a database, only issue it's on a RPi I have tucked away and I only have SSH access to it, and I was to keep it that way. Is there an easier way than installing g sqlite and writing a python script? Link to comment Share on other sites More sharing options...
G+_Akira Yamanita Posted December 17, 2016 Share Posted December 17, 2016 You could query the database directly via the CLI or copy it to another system that has the software that you need to read the SQLite database. You would just need an SFTP client or use scp to copy it. Link to comment Share on other sites More sharing options...
G+_Brandon M Posted December 17, 2016 Share Posted December 17, 2016 yeah I would just use the appropriate CLI program to use your DB. If you have a particular query you can run something like ssh user@server -t 'mysql -u root -pPassword dbname -e "SELECT * FROM table"' but you would use something more appropriate for your database type. This is assuming the database runs on a service and isn't just a random database file floating on the RPi Link to comment Share on other sites More sharing options...
G+_Travis Hershberger Posted December 19, 2016 Share Posted December 19, 2016 You could always allow network access to the database. If it's running Raspbian, you might already have access to it on port 3389. Link to comment Share on other sites More sharing options...
G+_Ben Reese Posted December 19, 2016 Share Posted December 19, 2016 Could maybe use SFTP to copy the sqlite DB to your phone and open it with something like aSQLiteManager. I don't know of any way to open a remote SQLite DB. Link to comment Share on other sites More sharing options...
G+_Travis Hershberger Posted December 19, 2016 Share Posted December 19, 2016 What OS is the RPi running? I could have you connecting to it with a remote MySql Workbench quick with an OS I know. Link to comment Share on other sites More sharing options...
G+_Jason Perry Posted December 19, 2016 Author Share Posted December 19, 2016 Raspbian Jessie Link to comment Share on other sites More sharing options...
G+_Jason Perry Posted December 19, 2016 Author Share Posted December 19, 2016 Honestly it is for my MQTT broker so I don't know if it is password protected Link to comment Share on other sites More sharing options...
G+_Travis Hershberger Posted December 19, 2016 Share Posted December 19, 2016 Jason Perry Ok, so far so good. Do you have any db users created besides root? (root is always limited to the local terminal only.) If you already do, you could plug that user information and the RPi IP into MySQL Workbench and it'll just work. If not, you can follow this guide: https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql Link to comment Share on other sites More sharing options...
G+_David Wiggins Posted December 19, 2016 Share Posted December 19, 2016 Yeah, depending on the type of DB, most management clients allow network access (is the DB has been configured to allow-note, most can be set to allow only specific IPs). MySQL workbench, postgres client, and so on. Travis Hershberger?hit the nail on the head. Workbench has a great GUI, there are others as well, one that runs in Java that my DBA recommend that I can't remember the name of. Link to comment Share on other sites More sharing options...
Recommended Posts