# net.sqlcipher.database.SQLiteException: file is not a database: , while compiling: select count(\*) from sqlite\_master;

**URL:** <https://discuss.zetetic.net/t/net-sqlcipher-database-sqliteexception-file-is-not-a-database-while-compiling-select-count-from-sqlite-master/3846>\
**Category:** SQLCipher\
**Created:** [August 21, 2019, 6:45am UTC](https://discuss.zetetic.net/t/net-sqlcipher-database-sqliteexception-file-is-not-a-database-while-compiling-select-count-from-sqlite-master/3846 "2019-08-21T06:45:08Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![sjlombardo](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/sjlombardo/32/3_2.png) [@sjlombardo](https://discuss.zetetic.net/u/sjlombardo)\
**Post date:** [August 26, 2019, 12:41pm UTC](https://discuss.zetetic.net/t/net-sqlcipher-database-sqliteexception-file-is-not-a-database-while-compiling-select-count-from-sqlite-master/3846/6 "2019-08-26T12:41:22Z")

</div>

Hello @pallavi - If you have preexisting databases that were created with prior versions of SQLCipher you would need to either migrate the databases or run in compatibility mode. The detailed options are described here:

> [@Upgrading to SQLCipher 4](https://discuss.zetetic.net/t/upgrading-to-sqlcipher-4/3283):
>
> The recent release of [SQLCipher 4](https://www.zetetic.net/blog/2018/11/30/sqlcipher-400-release/) introduces many new performance and security enhancements for applications that use SQLCipher for secure local data storage. However, the introduction of new default algorithms, increased KDF iterations and a larger page size means that SQLCipher 4 will not open older databases by default. This document provides guidance on the upgrade options available to applications that have previously integrated SQLCipher versions 1 through 3. Option 1: Database File Migr…

---

_[View the full topic](https://discuss.zetetic.net/t/net-sqlcipher-database-sqliteexception-file-is-not-a-database-while-compiling-select-count-from-sqlite-master/3846)._
