How to Create Password Protected SQLite Database

How to create a password protected or encrypted database using SQLite browser SQLCipher. Process to remove password from SQLite database.
In today's article I will show a simple tutorial with and example how you can create a password protected SQLite database. So, all know SQLite is an opensource database. We use DB Browser (SQLite) to create and manage the SQLite database. So, for this first we need to download the DB Browser (SQLite) software and install it into your system. you can download the DB Browser from below mention link.

After installing the DB Browser, you will get icon like this.

DB Browser (SQLite) Icon
Now let's open the DB Browser (SQLite) and create an SQLite database. 

Create SQLite database
Ones we create an SQLite database it will display in the DB Schema.

DB Schema

Now we can clearly see that the created DB is not password protected or encrypted. This is a real problem. Now we will follow the below steps to make the DB password protected too the above created new database.

So, whenever we install the SQLite Browser. We will get two different types of application get installed. 

SQLite DB Browser Type
To get this you will need to open the location by right clicking on the short icon "DB Browser (SQLite)", when this the location will open, we will get the two icons for DB Browser one having named in bracket as SQLCipher and second one is SQLLite. So here we will use "DB Browser (SQLCipher)".

Step 1:

Click on DB Browser (SQLCipher) and open the already created SQLite database or create a new databse. 

SQLite Database

Step 2: 

Now when you open the database it will not ask for the password. and if you try to open the database in notepad it will show the detail of the database. To avoid this and make the SQLite database password protected click on "Tools" from main menu and select option "Set Encryption". 

Set Encryption

Step 3:

Ones you click on "Set Encryption" below window will open.

SQLite encryption window

Here we are getting 3 encryption options. As per available detail on internet the best one for SQLite DB "SQLChipher 4 is the latest and good one. You can go as per your choice. 

Step 4:

In this step you need to add the password field value and the confirm password field value and click on ok to set the password. 

SQLlite Encryption Window With Password

Here one thing you need to take case both the added in the password which descript by "1" and one both the password is same "Ok" button will enable. Now click on ok button the setup the password. You must remember your added password to avoid blocking the database. 

Step 5:

Ones you completed step 3 by clicking on Ok. System will pop up for asking the password. you must provide the added password to unlock the database. 

Adding password for SQLite
 
Ones you click on "Ok" button by providing the correct password. Your database base will open.

SQLite database

Ones you open the DB file it will again ask for the password. To remove the password from SQLite database, you just need to click on Tools -> Set Encryption. In the opened window leave the password field blank and click on Ok. This action will remove password from SQLite database.

Post a Comment