mysql(mariadb)新建用户及用户授权管理

mysql(mariadb)新建用户及用户授权管理

create user newuser@localhost identified by ‘123456’;

查看用户权限

MariaDB [(none)]> show grants for my@localhost;
+--------------------------------------------------------------------------------------------------------------------+
| Grants for my@localhost                                                                                            |
+--------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'my'@'localhost' IDENTIFIED BY PASSWORD '*6BB4837EB74329105EE4568DDA7DC67ED2CA2AD9' |
+--------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

MariaDB [(none)]> 

指定授权(全部权限)

 grant insert,update,delete,select on *.* to mytest@localhost;

 

 

发表评论