username & password in sqlite3

后端 未结 4 608
再見小時候
再見小時候 2021-01-01 11:17

I am using sqlite3 in a linux machine and I am getting the database without username and password. Can I set a username and password for the same?

4条回答
  •  死守一世寂寞
    2021-01-01 12:08

    SQLite doesn't have a concept of username/password. It's just a single file based database.

    However, on Unix you can protect your database from other users on the same machine by setting the permissions of the database file itself.

    e.g. Allow only owner access

    chmod 700 /path/to/sqlitedb

    If it's used in a simple web application then the web application will provide the control.

提交回复
热议问题