mysql8.0创建用户授权

创建用户

     MySQL [(none)]> create user 'ops'@'%' identified by 'ops12300.';
       Query OK, 0 rows affected (0.01 sec)

授权

    MySQL [(none)]> grant all privileges on *.* to 'ops'@'%';
       Query OK, 0 rows affected (0.00 sec)
    MySQL [(none)]> flush privileges;
       Query OK, 0 rows affected (0.00 sec)

删除用户

   MySQL [mysql]> drop user 'ops'@'%';
   MySQL [mysql]> flush privileges;

猜你喜欢

转载自blog.51cto.com/9025736/2416521
今日推荐