UPDATE USER SET AUTHENTICATION_STRING=password('NewPassword') WHERE user='root' $mysql> UPDATE user SET Password=PASSWORD('my_password') where USER='root' ī) If you see ERROR 1046 (3D000): No database selected, then run this command first:Ĭ) If you see unknown 'Password' field error, then run this command: $mysql> UPDATE user SET authentication_string=PASSWORD('my_password') WHERE User='root' Ī) The command for MySql versions before 5.7 was: Sudo /usr/local/mysql/bin/mysqld_safe -skip-grant-tables You can also check System Preferences > MySQL to see if it is running Sudo /usr/local/mysql/support-files/rver stop Open a Terminal window, use the command below to stop mysql if it's already running.
You can do the following on Mac (El Capitan)