DIGIT-ARC read-only archive · snapshot: July 23, 2026

need help with mysql

3 posts · originally from https://geek.digit.in/community/threads/need-help-with-mysql.135774/

sanoob.tv
sanoob.tv Original post #1
Jan 6, 2011 at 8:07 PM
i hav been tryin to place a password for my mysql database,bt i awlways gets this error

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'use mysql

the code is:
mysql> use mysql
Database changed
mysql> UPDATE user
-> SET Password=PASSWORD<'nanana'>
-> WHERE user='root' ;

can any one tell whts wrong???
arpanmukherjee1
Jan 6, 2011 at 11:38 PM
try using
mysql> UPDATE mysql.user SET Password = PASSWORD('newpwd')
-> WHERE User = '';
mysql> FLUSH PRIVILEGES;

ref: *dev.mysql.com/doc/refman/5.0/en/default-privileges.html
sanoob.tv
Jan 8, 2011 at 11:09 AM
tried that too,doesnt seem to work

i was learning mysql from a tutorial(lynda.com),in thw video the guy changes his password,but when i try to do the same it gives the error

thnks for the effort