• Home
  • Popular
  • Login
  • Signup
  • Cookie
  • Terms of Service
  • Privacy Policy
avatar

Posted by @arijit87


10 Jul, 2024

Updated at 27 Dec, 2024

How to change the MySQL password?

We can chhange the MYSQL root password using the below statement:

?ALTER?USER?'root'@'localhost'?IDENTIFIED?BY?'NewPassword';?

?

Next, open a Command Prompt and navigate to the MySQL directory. Now, copy the following folder and paste it in our DOS command and press the Enter key.

C:\Users\devsqna>?CD?C:\Program?Files\MySQL\MySQL?Server?8.0\bin?

?

Next, enter this statement to change the password:

mysqld?--init-file=C:\\mysql-notepadfile.txt??

?

Finally we login our MYSQL root server using new password.