SQLITE winpty Error and "Connected to a transient in-memory database"

I’m trying to install sqlite locally and came across this error.
I think I downloaded sqlite a couple of weeks ago but I’m not sure what happened then.

What does “Connected to a transient in-memory database” mean?

This is the article that I was following:
https://www.codecademy.com/paths/web-development/tracks/sql-for-web-development/modules/setting-up-sqlite/articles/what-is-sqlite

Kevin Mei@KevinThinkpad MINGW64 ~/git/sqlite-tools-win32-x86-3340100/sqlite-tools-win32-x86-3340100 (master)
$ winpty ./sqlite3.exe
SQLite version 3.34.1 2021-01-20 14:10:07
Enter “.help” for usage hints.
Connected to a transient in-memory database.
Use “.open FILENAME” to reopen on a persistent database.
sqlite>^c

Kevin Mei@KevinThinkpad MINGW64 ~/git/sqlite-tools-win32-x86-3340100/sqlite-tools-win32-x86-3340100 (master)
echo "alias sqlite3=\"winpty {PWD}/sqlite3.exe"" >> ~/.bashrc

Kevin Mei@KevinThinkpad MINGW64 ~/git/sqlite-tools-win32-x86-3340100/sqlite-tools-win32-x86-3340100 (master)
$

Kevin Mei@KevinThinkpad MINGW64 ~/git/sqlite-tools-win32-x86-3340100/sqlite-tools-win32-x86-3340100 (master)
$ source ~/.bashrc

Kevin Mei@KevinThinkpad MINGW64 ~/git/sqlite-tools-win32-x86-3340100/sqlite-tools-win32-x86-3340100 (master)
$

Kevin Mei@KevinThinkpad MINGW64 ~/git/sqlite-tools-win32-x86-3340100/sqlite-tools-win32-x86-3340100 (master)
$ sqlite3 newdb.sqlite

winpty: error: cannot start ‘/c/Users/Kevin’: No such file or directory

The message that you are “Connected to a transient in-memory database” is normal when you start SQLite without opening an actual database file. It is telling you that you are connected to a database that will not persist forever – it is not saved to disk. This message goes away once you open an actual database file.

The real issue is that the command you are using to create the sqlite3 alias doesn’t account for the space in your username.

You will need to include single quotes around the ${PWD} like this:

$ echo "alias sqlite3=\"winpty '${PWD}'/sqlite3.exe\"" >> ~/.bashrc
2 Likes