Continue to create, accelerate growth! This is the 4th day of my participation in the "Nuggets Daily New Plan · June Update Challenge", click to view the details of the event
Life is endless, learning is endless
Off topic
An important aspect that humans are superior to other species is that humans have learned to think, so thinking is very important in the evolution of human beings. In order to prevent everyone from rusting their heads, I plan to give a question every day to let everyone think about it. .
Question of the day: Saying that the ghost in the ghost movie tried every way to send people to his side, wouldn’t it be embarrassing to meet him?
Without further ado, let's get stock!
text
Last time, I talked about the schema of Dameng database. Today, I will explain the user in detail.
User defined
You can directly use USER to connect to the data server in the Dream database. There are four types of users by default.
Admin, audit, security, system, with different permissions
For example: create a user TEST with a password of test123456
create user TEST identified by test12345;
复制代码
creat user creates a user, followed by a user name. Most of the names in the Dameng database are limited to 128 bytes in length, and the user name is unique.
identified by is the verification method, followed by the login password, that is, the password. The length of the password must exceed nine characters, otherwise an error will be reported.
When creating a user, you can also set resource limits, such as frequent sessions, for example: the previous example sets the session timeout to 30 minutes
create user TEST identified by test12345 limit connect_time 3;
复制代码
You can also set the encryption method for the password, for example, add sha256 encryption
create user TEST identified by test12345 hash with sha256 limit connect_time 3;
复制代码
You can also set the maximum number of connections, etc., please refer to the manual for details.
User modification and deletion
Modify and delete corresponding alter user and drop user
Note that the executor of the statement must have the corresponding authority. When deleting, it is the same as the mode. CASCADE can be added to prevent no error being reported.
Permission granted
The GRANT keyword grants user rights and can be used when creating and modifying users
For example: Modify the proxy permissions of user test to authenticate the login of user tt
ALTER USER test GRANT CONNECT THROUGH tt;
复制代码
Please look forward to the next article about building a table.
After reading, if you find any mistakes, write them down below! Compete with me, the black tiger Afu!