创建数据库用户user1和user2,密码为“1234”。______________________ —————————— ——————————;
举一反三
- 使用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';
- 创建一个新用户user1,设置其主目录为/home/user01查看/etc/passwd文件的最后一行。给用户user1设置密码为1234(--stdin)。锁定用户user1。(注意user1密码的锁定方法)让user1账号,对file1只有r权限,(user2账户属于其它)。
- 下面使用DROP USER语句删除用户user1的语句中,正确的是 A: DROP USER user1@localhost; B: DROP USER 'user1'.’ocalhost'; C: DROP USER user1.localhost; D: DROP USER 'user1'@'localhost';
- 用create user命令创建名为“u1”、主机名为localhost的数据库用户,密码为111。
- 下面使用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';