使用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';
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';
举一反三
- 使用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';
- 添加用户CREAT USER的一般格式为(?) A: Create [@主机名] [Identified By ]…[, …] B: Create User Identified By 用户名 C: Create User 密码 用户名 D: Create user [@主机名][identified by ]……[,……]
- 实现将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’;
- 下面使用DELETE语句删除用户user2的语句中,正确的是 A: DELETE FROM mysql.user WHERE Host='localhost' AND User='user2'; B: DELETE FROM mysql.user WHILE Host='localhost' AND User='user2'; C: DELETE FROM mysql.user WHERE Host='localhost' OR User='user2'; D: DELETE FROM mysql.user WHILE Host='localhost' OR User='user2';
- 以下创建用户账户正确的是()。 A: insert user 用户名@可登录地址 identified by '密码'; B: create user 用户名@可登录地址 identified by '密码'; C: update user 用户名@可登录地址 identified by '密码'; D: set user 用户名@可登录地址 identified by '密码';