I am currently writing a Python script to interact with an SQLite database but it kept returning that the database was “Encrypted or Corrupted”.
The database is definitely not encrypted and so I tried to open it using the sqlite3 library at the command line (returned the same error) and with SQLite Manager add-on for Firefox…
I had a copy of the same database structure but populated by a different instance of this program on a windows box, I tried to open it using SQLite Manager and it was fine, so as a quick test I loaded the “Encrypted or Corrupted” database onto a USB stick and plugged it into the windows machine, using the manager it opened first time without issues.
Does anyone have any idea what may be causing this?
EDIT:
On the Linux machine I tried accessing it as root with no luck, I also tried chmoding it to 777 just as a test (on a copied version of the DB), again with no luck
Does your Linux box have the same version of SQLite as your Windows box? An old version of SQLite may not be able to recognize files that use newer features. For example, WAL journal mode.