Replace “YOUR_PASSWORD” with your desired password. To make it work replace password with authentication_string and you are good to go UPDATE user SET authentication_string=‘YOUR_PASSWORD’ WHERE Host=’localhost’ AND User=’root’ If you are using MySQL5.7 the above code might not work for you. The query below will reset the root password UPDATE user SET Password=PASSWORD(‘YOUR_PASSWORD’) WHERE Host=’localhost’ AND User=’root’ You can do that by simply going to preference pane and click on MySQL then click on Stop MySQL Server or you type the command below in your Terminal to stop MySQL sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop Step 2: Skip Access Tablesįor MySQL5 execute the command below in your Terminal /usr/local/mysql/bin/mysqld_safe -skip-grant-tablesĪnd for older versions of MySQL, execute the command below in your Terminal /usr/local/mysql/bin/safe_mysqld -skip-grant-tables Step 3: Reset MySQL root passwordĪfter running the above command in a Terminal, open another Terminal window and run the command below which will open up MySQL console making it easier for you to update your MySQL root user. How will you solve such a problem in MacOS High Sierra. Here are some few steps to solving that issue that is resetting mysql root password. You might have had a situation where you forgot your MySQL root password.
0 Comments
Leave a Reply. |