Four steps for MySQL password setup in xampp (assuming you want to set a password of 123456)
1, enter Http://localhost/phpmyadmin enter phpMyAdmin page Click Mysql->user in the host for the Host,user as the root of the column enter 1234562, go back to the home page, click the top user User a column , in the user as root, the host for localhost this column click Edit Permissions, in the below change password to enter the password and re-enter the password 3, open the XAMPP installation directory under the phpMyAdmin folder config.inc.php change $cfg[' Servers ' [$i] [' password '] = ' $cfg[' Servers ' [$i] [' password '] = ' 123456 '; $cfg [' Servers '] [$i] [' allownopassword '] = True $cfg[' Servers ' [$i] [' allownopassword '] = false;4, go to My.ini in the bin directory under the MySQL folder under the XAMPP installation directory, change #password=password to password= 123456 more than four steps to complete, the password is set up, the command line to the bin directory of the MySQL, you can enter mysql-uroot-p123456 carriage return to do the corresponding operation without a password from the command line into the input command Mysql-hlocalhost- Uroot-p Enter twice
Password settings for MySQL in xampp