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…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索