How does mysql view user permissions
How does mysql view user permissions
How to view user privileges in mysql: 1. To view the privileges of a MySQL user, the syntax is [show grants for user name]; 2. To use the authorization method of the database, the code is [GRANT ON ..]. 【Related learning recommendation: mysql tutorial(video)】 How to check the permissions of the user table in mysql: (1) Check the permissions of a MySQL user: show grants for username MariaDB [neutron]> show grants for root; (2) Use the GRANT command to create new users, set user passwords, and increase user rights. The format is as follows: mysql> GRANT ON TO [IDENTIFIED BY “”] [ WITH GRANT OPTION]; Example: GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@& #39;localhost'IDENTIFIED BY'NEUTRON_DBPASS'; GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY 'NEUTRON_DBPASS'; neutron.* : Indicates all tables in the neutron database, and the neutron library must be created before authorization. If *.* means all tables of all libraries & # 39; neutron & # 39; @ & # 39; localhost & # 39; : Indicates the created user name neutron, followed by @ indicates the client that is allowed to access the data, ‘localhost’ indicates the local machine, ‘%’ indicates all hosts [IDENTIFIED BY “”]: set neutron…