AppServ provides us phpMyAdmin to manage MySQL databases on our Windows computer. Root is the default database to log into MySQL server. You can use root and its password to login from phpMyAdmin web interface. If you can’t login phpMyAdmin, or the access was denied by your database server and throws an error like, mysqli_real_connect(): (HY000/1045): Access denied for user ‘root’@’localhost’ (using password: YES). You can try to reset its password.
Reset MySQL Root Password from Shortcut
Click the Start menu in Windows 10, find AppServ from All programs list, click to expand AppServ, choose Reset MySQL Root Password. You’ll be prompted to enter new MySQL root password. Type in the new root password, press Enter on your keyboard.
If this method can’t help you reset root password or log into MySQL server from phpMyAdmin, try to reset password from Windows Command Prompt. Check out more details below.
Reset MySQL Root Password from Windows Command Prompt
Open Command Prompt on your Windows PC, change path to appserv\mysql\bin\. Run following command.
mysql -u root -p
You’ll be prompted to enter root password.You can type in the root password and press Enter on your keyboard to execute. Based on our experience, we can just press Enter without typing the password to login MySQL server directly.
Then run below command to change or reset root password.
ALTER USER 'root'@'localhost' IDENTIFIED BY 'newpassword';