mysql常用操作

查看用户
SELECT user, host FROM mysql.user;

创建用户
CREATE USER 'temp_user'@'%' IDENTIFIED BY 'password';

授予用户权限
GRANT SELECT, INSERT, UPDATE, DELETE ON my_database.table1 TO 'temp_user'@'%';
GRANT SELECT, INSERT, UPDATE, DELETE ON my_database.table2 TO 'temp_user'@'%';
GRANT SELECT, INSERT, UPDATE, DELETE ON my_database.table3 TO 'temp_user'@'%';

posted @ 2024-11-05 11:04  jasmine456  阅读(2)  评论(0编辑  收藏  举报