sqlcipher command line not working

Posted by Min Lin on Stack Overflow See other posts from Stack Overflow or by Min Lin
Published on 2013-10-26T03:50:45Z Indexed on 2013/10/26 3:53 UTC
Read the original article Hit count: 329

Filed under:
|
|

I have a encrypted sqlite db and its key. (Which is generated by an android program). However, when I open the db in command line I can not read the db. The command line tool is installed by:

brew install sqlcipher

I open the database by:

sqlcipher EnDB.db
>pragma key="6b74fcd";
>select * from bizinfo;

It keeps telling me "Error: file is encrypted or is not a database"

However, if I open the database file with gui app sqlite database browser (which is a windows program and I run it in wine). It pops up a window for me to enter the key, with 6b74fcd as the key it successfully read the database.

sqlite database browser

As I want to automatically process the db in the future, I can not depend on the GUI. Do you know why the command line is not working?

© Stack Overflow or respective owner

Related posts about database

Related posts about sqlite