I\'m new to the whole Mac experience. I recently installed MySQL and it seems I have to reset the password after install. It won\'t let me do anything else.
Now I al
On Ver 14.14 Distrib 5.7.19, for macos10.12 (x86_64)
, I logged in as:
mysql -uroot -p
then typed in the generated password by MySQL when you install it. Then..
ALTER USER 'root'@'localhost' IDENTIFIED BY '<new_password>';
Example:
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'Ab1234';
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
$ mysql -uroot -p
And you can type in 'Ab1234'
When you use SET PASSWORD = PASSWORD('your_new_password');
it may crash for it
(ERROR 1819 (HY000): Your password does not satisfy the current policy requirements)
.you can use SET GLOBAL validate_password_policy=LOW;
to slove it.
This worked for me:
ALTER USER USER() IDENTIFIED BY 'auth_string';
I found it here: http://dev.mysql.com/doc/refman/5.7/en/alter-user.html#alter-user-current
Had the problem after I installed mysql workbench and mysql community server. Got generated password during the server installation. Double clicking on the exisiting local instance in workbench triggered a dialog where I could set the new password.
On MySQL 5.7.x you need to switch to native password to be able to change it, like:
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'test';
I also got the same problem in mac OS X 10.10.4(Yosemite).SET PASSWORD work for me.Alter password for mysql- mysql> SET PASSWORD = PASSWORD('your_password'); Query OK, 0 rows affected, 1 warning (0.01 sec)
set your Mysql environment path variable in .bash_profile and add the below line
export PATH=$PATH:/usr/local/mysql/bin,
after that, run the following command :source .bash_profile