-1

I am unable to remember the password for mysql database.

Using the ALTER USER statement does not work to update the password.

does anyone know how to do this?

I am entering:

ALTER USER 'root'@'localhost' IDENTIFIED BY 'passwordhere';

the error I am receiving is

"You must reset your password using the ALTER USER 
statement before executing this statement." 
473183469
  • 1,390
  • 2
  • 12
  • 24
Karen
  • 1
  • 2

1 Answers1

0

As described in mysql reference manual, the syntax for password change is:

SET PASSWORD = PASSWORD('new_password');

Also - similar question was answered here: https://stackoverflow.com/questions/33467337/reset-mysql-root-password-using-alter-user-statement-after-install-on-mac