File is not a database when opening a newly created and encrypted database

I created a database with DbBrowser for Sqlite.
Then i set Encryption from Tools menu.
When i Open the database in the same application (with encryption available) the database opens.
But when i open the encrypted db with DbBrowser for Sqlite (without encryption option) it shows that “File is not a database”.
I do not know coding.
So please advice how to open the encrypted db?

Hi @princeteekoy

When operating on a SQLCipher encrypted database, the application that is using SQLCipher must provide a valid password in order to access any content within the database. That is why you are able to access it properly with DB Browser for SQLite with SQLCipher (when you provide the password).

You can continue to use DB Browser for SQLite with SQLCipher if you wish to maintain a database that is encrypted with SQLCipher. Please let us know if you have any further questions.

Thanks for the reply. But still it is not working.
I did the following.

  1. Created a new database with DB Browser for SQLite (with encryption)

  2. Encrypted the DB with a Password.

  3. Closed the DB.

  4. Opened the DB by giving password in the same application.

  5. Closed the DB and Application

  6. Opened DB Browser for SQLite (WITHOUT encryption)

  7. Opened the same DB. But message shows “Could not open the database. Reason: File is not a database”
    image

What is the solution??

Hello @princeteekoy

That is the correct behavior. A SQLCipher database cannot be opened without both using SQLCipher, and providing the password that was used to encrypt the database.

If you wish to take an encrypted SQLCipher database and export it to a plaintext SQLite database (that can be accessed without encryption), you can use the sqlcipher_export(...) convenience function.

A post was split to a new topic: “file is encrypted or is not a database” using node js sqlite3 package with SQLCipher