Resetting MySQL Root Password with XAMPP on Localhost

后端 未结 15 1566
北荒
北荒 2020-11-30 21:11

So for the past hour I\'ve been trying to figure out how to reset my \'root\' password for MySQL as I cannot log into PHPMyAdmin. I\'ve tried changing the password in the co

15条回答
  •  遥遥无期
    2020-11-30 21:46

    Follow the following steps:

    1. Open the XAMPP control panel and click on the shell and open the shell.
    2. In the shell run the following : mysql -h localhost -u root -p and press enter. It will as for a password, by default the password is blank so just press enter
    3. Then just run the following query SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpassword'); and press enter and your password is updated for root user on localhost

提交回复
热议问题