使用GRANT语句创建用户名为user1、密码为123,并授予该用户对chapter08.student表有查询权限。 下面选项中,能实现上述功能的语句是
A: GRANT SELECT ON chapter08.student FOR 'user1'@'localhost' IDENTIFIED BY '123';
B: GRANT USER SELECT ON chapter08.student TO 'user1'@'localhost' IDENTIFIED BY '123';
C: GRANT USER SELECT ON chapter08.student 'user1'@'localhost' IDENTIFIED BY '123';
D: GRANT SELECT ON chapter08.student TO 'user1'@'localhost' IDENTIFIED BY '123';
A: GRANT SELECT ON chapter08.student FOR 'user1'@'localhost' IDENTIFIED BY '123';
B: GRANT USER SELECT ON chapter08.student TO 'user1'@'localhost' IDENTIFIED BY '123';
C: GRANT USER SELECT ON chapter08.student 'user1'@'localhost' IDENTIFIED BY '123';
D: GRANT SELECT ON chapter08.student TO 'user1'@'localhost' IDENTIFIED BY '123';
举一反三
- 使用CREATE USER语句创建一个新用户,用户名为user2、密码为123 下面选项中,能实现上述功能的语句是 A: CREATE USER 'user2'@'localhost' IDENTIFIED BY '123'; B: CREATE USER user2@localhost IDENTIFIED BY 123; C: CREATE USER 'user2'@'localhost' IDENTIFIED TO '123'; D: CREATE USER user2@localhost IDENTIFIED TO '123';
- 下面使用DROP USER语句删除用户user1的语句中,正确的是 A: DROP USER user1@localhost; B: DROP USER 'user1'.’ocalhost'; C: DROP USER user1.localhost; D: DROP USER 'user1'@'localhost';
- 【单选题】把对Student表的全部操作权授予用户User1和User2的语句是(1.0分) A. GRANT All ON Student TO User1, User2; B. GRANT Student ON All TO User1, User2; C. GRANT All TO Student ON User1, User2; D. GRANT All TO User1, User2 ON Student;
- “把查询SC表和更新SC表的grade列的权限授予用户user”的正确SQL语句是( )。 A: GRANT SELECT sc.UPDATE sc.grade TO user B: GRANT SELECT,UPDATE(grade)ON TABLE sc TO user C: GRANT SELECT,UPDATE ON TABLE sc.grade TO user D: GRANT SELECT ON TABLE sc,UPDATE ON TABLE sc(grade)TO user
- 实现将root用户的密码修改为'1111'的语句,正确的是() A: alter user 'root'@'localhost' identified by ‘1111’; B: alter user 'root'@'localhost' identified by 1111; C: alter user 'root'@'localhost' =‘1111’; D: set user 'root'@'localhost' =‘1111’;