Off-platform help needed with basic use of Terminal to open database using SQlite

I’m a total beginner to using terminals/command lines. I’m doing the data science stream and got up to the off-platform SQL lesson.

I downloaded SQLite, the sample database and Git Bash as instructed. I then tried to follow the video on ‘go-off platform for working with SQLite’, ‘Setting up SQLite Locally’ :

I am completely stuck at the point in the video where he uses the terminal to open the example database using SQlite.exe. In the video he is using cmdr and inputs ./sqlite.exe/FILENAME to get the database to open. I can only get as far as the ‘ls’ step using Git Bash. :frowning:

Hello @elviramanjaji4572717, welcome to the forums. Could you post your command line code please.

I just tried to copy what the instructor did exactly (./sqlite.exe/FILENAME into the terminal) and nothing happened. I don’t know if that clarifies? I’m a real beginner. Beyond doing the basic command line lesson I really don’t know much.

What is the name of the file? Did you put that instead of FILENAME?

Yes. The name of the file is acs-1-year-2015.sqlite.
It is the exact same name the instructor used. So I typed
./sqlite.exe/acs-1-year-2015.sqlite (like the instructor) and nothing happened.


Make sure that the file (acs-1-year-2015.sqlite) and the executable (sqlite3.exe) are both in the same folder, and make sure you’ve opened your terminal to that folder. Then make sure you type the exact command he did: ./sqlite3.exe acs-1-year-2015.sqlite

In the command you posted here, you left out the 3 in sqlite3 and you put a forward slash instead of a space:

Thanks for your patience! Sorry - my OP just had typos. I definitely put in:
./ sqlite3.exe acs-1-year-2015.sqlite

Once I put that in it just says ‘it is a directory’'but nothing further happens!

No worries. Without seeing your computer it’s hard to diagnose the problem. If you post a screenshot, I’d be able to help a lot more.

Did you already run through the instructions on the link you posted for setting up the sqlite3 alias in Git Bash, or did you just skip to the video? I only ask because if you did, there’s no reason to open the file the way he does in the video.

I go to the file and hit ‘Git bash here’ - that opens the file and then I hit ls - which shows the correct files in the directory. It’s just that next step. I do wonder if I haven’t downloaded/installed something correctly. It’s OK - I’m planning to keep going through the lessons and then maybe get a tutor for an hour or so for the off-platform stuff.

Try these two things before considering paying for a tutor:

  • Type winpty ./sqlite3.exe acs-1-year-2015.sqlite and see if that works.

If that doesn’t work try this:

  • Type winpty ./sqlite3.exe and see if that opens up SQLite. If it does, just use the command .open acs-1-year-2015.sqlite and it will open your database.
1 Like

Really annoying but that still doesn’t work. Never mind - you tried. I’m sure it’s something really stupid that I’ve done.

Alright. Well if you don’t want to use the command line, then feel free to use a GUI application like DB Browser. It’s a lot better for exploring a database, and you can still type your own SQL queries in so you don’t have to use the point and click method if you don’t want to.

Oh wow! Thanks - I’ll have a look. Very helpful!

Thank you so much - I just downloaded the browser and I think this is what I should look at initially. It is perfect.

No problem.

Understanding how to use SQLite on the command line is useful — and it is necessary for when you want to incorporate it into your apps/programs — but for exploring/interacting with data I think options like DB Browser are better.

Enjoy and happy coding!

1 Like