Specific method: 1. Open Command Prompt 2. Enter the mysql -u root -p command and press Enter 3. Enter the correct password and enter the mysql command line 4. View user authorization information SHOW GRANTS FOR 'root'@'localhost'; Check the authorization information for the user name root and the host name localhost. Knowledge point expansion: MySQL View the permissions granted by the user In MySQL, how do you view the permissions a user has been granted? The permissions granted to users may be divided into global-level permissions, database-level permissions, table-level permissions, column-level permissions, and subroutine-level permissions. The specific categories are as follows: Global Level Global privileges apply to all databases in a given server. These permissions are stored in the mysql.user table. GRANT ALL ON *.* and REVOKE ALL ON *.* grant and revoke only global privileges. Database level Database privileges apply to all objects in a given database. These permissions are stored in the mysql.db and mysql.host tables. GRANT ALL ON db_name.* and REVOKE ALL ON db_name.* grant and revoke database privileges only. Table Level Table privileges apply to all columns in a given table. These privileges are stored in the mysql.tables_priv table. GRANT ALL ON db_name.tbl_name and REVOKE ALL ON db_name.tbl_name grant and revoke table privileges only. Column level Column permissions apply to a single column in a given table. These privileges are stored in the mysql.columns_priv table. When using REVOKE, you must specify the same columns as those being granted. Subroutine level CREATE ROUTINE, ALTER ROUTINE, EXECUTE, and GRANT privileges apply to stored routines. These privileges can be granted at the global level or at the database level. Also, except CREATE ROUTINE, these privileges can be granted at the subprogram level and are stored in the mysql.procs_priv table. The above is the detailed content of the specific method of viewing user authorization information in MySQL. For more information on how to view user authorization information in MySQL, please pay attention to other related articles on 123WORDPRESS.COM! You may also be interested in:
|
<<: Some data processing methods that may be commonly used in JS
>>: How to use fdisk to partition disk in Linux
1. Install Docker. Reference URL: Docker Getting ...
This article introduces the content related to gi...
Table of contents 1. How to switch 2. Dynamically...
Recently, the company has put forward a requireme...
Recently, when I installed MySQL in Docker, I fou...
Table of contents Preface Architecture at a Glanc...
When we install and configure the server LNPM env...
The specific usage of the Vue image drag and drop...
This article shares the data display code for Jav...
This article is a simple calculator written using...
You can use the trigger method. There is no native...
Introduction to kubectl kubectl is a command line...
Preface The origin is a question 1: If your umask...
NProgress is the progress bar that appears at the...
Connection query: It is the result of connecting ...