When using a database, you will encounter multiple users and assign user permissions. Some users can only read, some users can read and write, and some users can only operate. For one or more databases, how to set permissions for mysql users? Here I will describe how to use navicat graphical operations to assign user permissions
If you use sql grant to assign permissions, refer to MYSQL database management Permission management
Basic sql grant command:
Assign a user all permissions to a single database: grant all on database name.* to user name@ ’%’ identified by ‘password’;
Query database user permissions: show grants for username@’%’;
Note: The Host configuration is %, which means all IPs can access
##Key points:
Permissions | Permission Level | Permissions Description |
CREATE | Database, table or index | Create Database, table or index permissions |
DROP | ##Database or tableDelete database or table permissions | |
Database, table or saved program | Grant permission options | |
Database or table | ||
Table | ALTER TABLE , such as adding fields, indexes, etc. | |
Table | Delete data permissions | |
Table | Index permissions | |
Table | INSERT PERMISSION | |
Table | Query Permission | |
Table | Update Permission | |
View | Create View Permission | |
View | View view permission | ##ALTER ROUTINE |
Stored Procedure |
Change Stored Procedure Permissions |
CREATE ROUTINE |
Stored Procedure |
Create Stored Procedure Permission |
EXECUTE |
Stored Procedure |
Execute Stored Procedure Permission |
FILE |
File access on the server host |
File access permissions |
CREATE TEMPORARY TABLES |
Server Management |
Create Temporary Table Permission |
LOCK TABLES |
Server Management |
Lock table permissions |
CREATE USER |
Server Management |
Create User Permissions |
PROCESS |
Server Management |
View process permissions |
RELOAD |
Server Management |
Permission to execute flush-hosts, flush-logs, flush-privileges, flush-status, flush-tables, flush-threads, refresh, reload and other commands |
|
REPLICATION CLIENT |
Server Management |
Copy Permission |
REPLICATION SLAVE |
Server Management |
Replication Permission |
SHOW DATABASES |
Server Management |
View database permissions |
SHUTDOWN |
Server Management |
Close database permissions |
SUPER |
Server Management |
Execute kill thread permission |
The above is the detailed content of How to solve the problem of configuring mysql database user permissions in Navicat. For more information, please follow other related articles on the PHP Chinese website!