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;
相關文章
相關標籤/搜索