This article mainly tells you about the actual operation process of MySQL database permission settings. We all know that MySQL database permissions are generated with the development of MySQL Databases and are gradually paid attention, the following articles describe how to set MySQL database permissions.
Add the user's permission to access the MySQL database
- grant all on sonardb.* to sonar@'%' identified by '123456';
Sonardb: Database Name, which can be '*' to indicate all databases.
Sonar: Specifies the user name.
%: Indicates all remote machines. You can also specify the IP address of the remote machine.
Delete user access
- delete from user where user='sss' and host='localhost' ;
Sss: user name.
Localhost: MySQL database access permission
- flush privileges ;
Update the permission table.
Delete the user's MySQL database Permissions
- revoke all on *.* from sss@localhost ;
The above content is an introduction to MySQL database permission settings. I hope you will find some gains.
The above content describes the MySQL database permission settings, hoping to help you in this regard.