I get error "failed to open /tmp/splite/testdb.db" when I deploy my "sqlite" project at Node-Red.
The "sqlite" node properties "Database" setting is "/tmp/splite/testdb.db".
The database file is "pi@raspberrypi:/tmp/sqlite/testdb.db",
The database properties is:
-rwxrwxrwx 1 pi pi 12288 Jan 14 20:45 testdb.db
I can use command line to create table "sqlite> CREATE TABLE test1(name,url);" , and didplay the table by using .table.
and isnt the /tmp directory wiped on linux systems after each restart ?
not a good place to store your db file .. better place it under .node-red folder (makes it easier to backup)
There are two issues, one is mistake for the file name spelling, another is the database folder will be deleted when I restart Raspberry Pi.
I build the database file in the same directory as the project, is is better for backup project?
So the final files are:
pi@raspberrypi:~/.node-red/projects/SQLite $ ls
flow_cred.json flow.json package.json README.md testdb.db