Where is the syntax error in this MySQL command -> update user set authentication_string=PASSWORD("") where User='root'; | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Where is the syntax error in this MySQL command -> update user set authentication_string=PASSWORD("") where User='root';

Am trying to change my settings but I keep getting stuck here! Inside PASSWORD("") brackets is double quotes without white space.

15th Nov 2020, 2:36 PM
Hilary
Hilary - avatar
6 Answers
+ 2
UPDATE mysql.user SET Password=PASSWORD('') WHERE User='root';
15th Nov 2020, 5:31 PM
JaScript
JaScript - avatar
+ 1
Try to use '' instead of ""?!
15th Nov 2020, 2:47 PM
CHERIEF Houcine Abdelkader
CHERIEF Houcine Abdelkader - avatar
15th Nov 2020, 6:53 PM
JaScript
JaScript - avatar
0
CHERIEF Houcine Abdelkader , I tried it too. Same problemo!!!
15th Nov 2020, 2:49 PM
Hilary
Hilary - avatar
0
Is there an attribute which is named User?
15th Nov 2020, 2:53 PM
CHERIEF Houcine Abdelkader
CHERIEF Houcine Abdelkader - avatar
0
Maybe password() doesn't accept a empty string?!
15th Nov 2020, 2:55 PM
CHERIEF Houcine Abdelkader
CHERIEF Houcine Abdelkader - avatar