将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'
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'
举一反三
- 实现将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’;
- 已知某系统登录的用户名和密码分别为"python"和"123456",则依次执行语句user=input("请输入用户名:")和password=input("请输入密码:")后,可通过以下哪个表达式对用户是否能成功登录进行判断: A: user=="python" && password=="123456" B: user=="python" and password=="123456" C: user=="python" or password=="123456" D: user=="python" || password=="123456"
- 2、以root用户登录,将用户user1的密码改为“123456”set password ______ user1@localhost =______ ('123456');
- 下面通过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';
- MySQL数据库用户名为root,密码为123456。输入什么命令可以将用户root的密码修改为root。