Friday 24 July 2020

MySQL tric

To set up your password for the first time:
mysql> SET PASSWORD = PASSWORD('your_new_password');
Query OK, 0 rows affected, 1 warning (0.01 sec)
 
If this is NOT your first time setting up the password, try this method:
mysql> UPDATE mysql.user SET Password=PASSWORD('your_new_password') WHERE User='root';
 
 
Source : https://stackoverflow.com/questions/33467337/reset-mysql-root-password-using-alter-user-statement-after-install-on-mac 

No comments:

Post a Comment