当前位置:网站首页>MySQL simple permission management

MySQL simple permission management

2022-06-25 07:52:00 Wangcai 2

Create database

CREATE DATABASE IF NOT EXISTS `wangcai` CHARACTER SET 'utf8mb4' COLLATE 'utf8mb4_general_ci';

Create user wangcai111, password 123456
CREATE USER `wangcai111`@`%` IDENTIFIED BY '123456';


Authorized user wangcai111 to wangcai All tables in this library have all permissions
GRANT ALL ON wangcai.* TO 'wangcai111'@'%';


Take back wangcai111 user wangcai Of all tables under the library select jurisdiction
REVOKE Select ON wangcai.* FROM 'wangcai111'@'%';

原网站

版权声明
本文为[Wangcai 2]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/176/202206250601024548.html