how to change password in workbench code example
Example 1: forgot my mysql password mac
MacOSX MySql root Password Reset master solution
Step by step guide-
$ brew services stop mysql
$ pkill mysqld
$ rm -rf /usr/local/var/mysql/ # NOTE: this will delete your existing database!!!
$ brew postinstall mysql
$ brew services restart mysql
$ mysql -u root
Example 2: how to change mysql localhost password
ALTER USER 'root'@'localhost' IDENTIFIED BY 'NewPassword'