Git Bash SQLite - Still can't get this to run

I still can’t seem to connect SQLite3 in Git Bash, I can see alot of people can’t follow the instructions and get stuck, can someone help on this?

I can download Git Bash but can’t seem to connect the downloaded SQLite3

Git Bash

Once SQLite is installed, you’ll need the location of the exe (sqlite3.exe) and a location to put the database file like (/sqlite_data).

Second, you’ll want to create an alias in the .bashrc file to that sqlite executable. The .bashrc is run every time bash is started (i.e. every time you open git bash):

echo "alias sqlite3=\"C:\\location\of\sqlite\sqlite3.exe\"" >> ~/.bashrc

Next, you’ll need to reload the bash settings:

source ~/.bashrc

You should be able to run sqlite3 in bash. Of course, you’ll need a database file to connect to. It is easy to create one. navigate to the folder you’re using for the sqlite database and add the file name to the sqlite3 command.

cd ~/sqlite_data
sqlite3  my_first_db.sqlite

Voila! You’re connected.

Ok I have made it through a little bit further, but unsure how to proceed on the next section

mitch@DESKTOP-20IMKIG MINGW64 ~
$ cd OneDrive/Desktop/sqlite-tools-win32-x86-3350400

mitch@DESKTOP-20IMKIG MINGW64 ~/OneDrive/Desktop/sqlite-tools-win32-x86-3350400
$ winpty ./sqlite3.exe
SQLite version 3.35.4 2021-04-02 15:20:15
Enter “.help” for usage hints.
Connected to a transient in-memory database.
Use “.open FILENAME” to reopen on a persistent database.
sqlite> Ctrl+C
…>

All sorted, figured it out now! Thanks for your help

1 Like