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?
相关问题
- connecting to database using RMySQL, R and MySQL
- How do designer-generated table adapters handle co
- WCF Authenticate Client with database
- Python: decryption failed or bad record mac when c
- Oracle: Difference between non-pooled connections
相关文章
- Getting current connection properties in SQL Serve
- SQLSTATE[HY000] [2002] Permission denied
- Connect to Postresql database from Google Colab
- how can I connect to database
- My Spring application leaks database connections w
- Get Username from Amazon Access Key in Java
- where to store global database connection paramete
- SQL Express connection string hell ASP.Net
No, sqlite3 databases are very lightweight systems. They need no server and all data is stored in one file. A username/password is not supported by the sqlite/sqlite3 package.
(sqlite, when to use)
However, since it's only a file you can encrypt the file with a password to protect your data.
The prior answers are only partially true. You can have databases that require authentication but you'll have to compile SQLite separately from PHP.
See the SQLite User Authentication documentation for further information.
SQLite is mainly an embedded database engine, not intended to be used as a multi-user database server that would require usernames and passwords.
You can always encrypt the database file with some user-provided password/-phrase, I guess. But expecting an embedded DBMS to sport full-blown access control is too much.
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
If it's used in a simple web application then the web application will provide the control.