No announcement yet.

How to create SqLite database with password

  • Filter
  • Time
  • Show
Clear All
new posts

  • How to create SqLite database with password

    I would like to create a new SqLite3 database that is protected by a password with Navicat.
    Then I would like to be able to connect to that Database with a C# program.

    I expected that the creation wizard of Navicat would provide a text field for specifying a
    password. However, there is no text field to specify the password for a new database.

    So how do I specify the password for a new database?

    When creating a connection to an existing database file,
    there is a password field on the "General" tab. Therefore I assume that Navicat is able to
    connect to password protected SqLite databases.

    Furthermore, on the second tab "Advanced" there is the "Encrypted" option with another text field for a password.
    If I open an existing database (without password) I am able to decrypt the database (Right click on main => Encrypt database).
    and specify a password. If I want to reopen a encrypted database I will have to use the "Encrypted" option on the
    Advance tab and specify that password. This clarifies the purpose of the second password.

    But where do I specify the "first one"? Is it possible to set it with a query?

  • #2
    By default, a SQLite database does not require user authentication (no-authentication-required database). After you created a user, the database will be marked as requiring authentication (authentication-required database). Then, user need to provide username and password when connecting to the database file.

    To create a user, you can open a SQLite database in Navicat and then click the User icon.


    • #3
      Thanks. This works fine. However, the password protection does not seem to help much. Navicat actually asks for the password if I try to reopen the protected database. However, if I use "SQlite Expert Personal" the content is shown without asking for a password. Therefore it seems that I have to go for the encryption option anyway.
      Last edited by matameko; 10-10-2016, 12:28 PM.