How does mysql increase users?
This article mainly explains "how to increase the number of users in mysql". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "how to increase users in mysql".
Add users:
(note: the following is a command in the MYSQL environment, so it is followed by a semicolon as a command Terminator)
Format: grant select on database. * to user name @ login host identified by "password"
The first kind:
Add a user's test1 password to abc, so that he can log in on any host and have the authority to query, insert, modify and delete all databases. First use the root user to connect to MYSQL, and then type the following command:
Grant select,insert,update,delete on *. * to test1@ "%" Identified by "abc"
But the increase in the number of users is very dangerous. If you want someone who knows the password of test1, he can log in to your mysql database on any computer on internet and do whatever he or she wants with your data. The second solution is as follows:
The second kind:
Add a user's test2 password to abc, so that he can only log in on localhost and query, insert, modify and delete the database mydb (localhost refers to the local host, that is, the host where the MYSQL database is located), so that even if the user knows the test2 password, he cannot directly access the number from the internet.
Mysql > grant select,insert,update,delete on book.* to test2@localhost Identified by "abc"
If you don't want test2 to have a password, you can issue another command to eliminate the password.
Mysql > grant select,insert,update,delete on book.* to test2@localhost Identified by ""
At this point, I believe you have a deeper understanding of "how to increase the number of users of mysql". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!