How to fix unrecognized token error in encrypting a plaintext database?

I’m new in SQLCipher and following this commands to encrypt my database, but get this error after entering second line:

$ ./sqlcipher plaintext.db
sqlite> ATTACH DATABASE ‘encrypted.db’ AS encrypted KEY ‘testkey’;

“Error: in prepare, unrecognized token: “$” (1)”

How to fix it?

Hi @Davood - it looks like the SQL pasted here might be using opening and closing single quotes (i.e. curly single quotes). That would be invalid SQL. Could you try using straight single quotes, ', around the database name and key?