下面通过UPDATE语句将root用户的密码修改为mypwd2的语句中,正确的是
A: UPDATE mysql.user SET Password=PASSWORD('mypwd2') WHERE User='root' and Host='localhost';
B: UPDATE mysql.users SET Password=PASSWORD('mypwd2') WHERE User='root' and Host='localhost';
C: UPDATE mysql.users SET Password=PASSWORD('mypwd2') WHERE User='root' OR Host='localhost';
D: UPDATE mysql.user SET Password=PASSWORD('mypwd2') WHILE User='root' OR Host='localhost';
A: UPDATE mysql.user SET Password=PASSWORD('mypwd2') WHERE User='root' and Host='localhost';
B: UPDATE mysql.users SET Password=PASSWORD('mypwd2') WHERE User='root' and Host='localhost';
C: UPDATE mysql.users SET Password=PASSWORD('mypwd2') WHERE User='root' OR Host='localhost';
D: UPDATE mysql.user SET Password=PASSWORD('mypwd2') WHILE User='root' OR Host='localhost';
举一反三
- 下面使用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';
- 下面使用SET语句将root用户的密码修改为mypwd3的描述中,正确的是() A: root登录到MySQL,再执行: SET PASSWORD=password('mypwd3'); B: 直接在DOS中执行: SET PASSWORD=password('mypwd3'); C: root登录到MySQL,再执行: SET PASSWORD=password(mypwd3); D: 直接在DOS中执行: SET PASSWORD= 'mypwd3';
- 下面使用SET语句将root用户的密码修改为admin的描述中,正确的是()。 A: 直接在命令行中执行:SET PASSWORD=password('admin'); B: 直接在命令行中执行:SET PASSWORD='admin'; C: root登录到MySQL,再执行:SET PASSWORD=password('admin'); D: root登录到MySQL,再执行:SET PASSWORD=password(admin);
- 将root用户的密码设置为“123456”,下列语句正确的是( )。 A: MODIFY USER 'root'@'%' IDENTIFIED BY '123456' B: MODIFY USER 'root'@'%' PASSWORD '123456' C: ALTER USER 'root'@'%' IDENTIFIED BY '123456' D: ALTER USER 'root'@'%' PASSWORD '123456'
- 下列可以将mysql的本地root用户的密码修改为‘123’的是() A: setpasswordforroot@'localhost'=password('123'); B: updatemysql.usersetpassword=password('123')whereuser='root'andhost='localhost'; C: selectpasswordforroot@'localhost'=password('123'); D: createuserroot@'localhost'identifiedby'123';