Set password error in MySQL -
i trying reset root password using following command:
set password 'root'@'localhost' = password('test');
and gives me following error:
error 1064 (42000): have error in sql syntax; check manual corresponds mysql server version right syntax use near 'password('test')' @ line 1
please let me know doing wrong here.
you not need quote user name , should as
mysql> set password root@'localhost' = password('test'); query ok, 0 rows affected (0.00 sec) mysql> flush privileges ; query ok, 0 rows affected (0.00 sec)
the other way of re-setting password login mysql root , update mysql
database user
table
abhik@-n4010:~$ mysql -u root -p enter password: mysql> use mysql reading table information completion of table , column names can turn off feature quicker startup -a database changed mysql> update user set password = password('test') host='localhost' , user='root'; query ok, 1 row affected (0.00 sec) rows matched: 1 changed: 1 warnings: 0 mysql> flush privileges ; query ok, 0 rows affected (0.00 sec)
Comments
Post a Comment