1關掉xampp,中止xampp服務;等下。或者重啓機子。php
2用xampp的shell(記住不能啓動)cd c:\xampp3輸入 service mysqld stop;4輸入 mysqld --skip-grant-tables;5從新打開一個xamppshell(命令行)6mysql -uroot 7use mysql8 update user set password=password(111) where user='root';//重點,你之因此改了密碼,但按原來的密碼進不去就是由於password()把你的密碼編碼了。你以前是否是也和我同樣updata user set password=111where user='root'9flush privileges10\q你覺得這樣就ok了no還差點.11找到config.default.php更改$cfg['Servers'][$i]['password'] = '';//$cfg['Servers'][$i]['password'] = ''111;C:\xampp\phpMyAdmin\libraries\config.default.php12config.inc.php更改$cfg['Servers'][$i]['password'] = '111';$cfg['Servers'][$i]['AllowNoPassword'] = false;//C:\xampp\phpMyAdmin\config.inc.php以上是設置了默認密碼,若是要啓用密碼$cfg['Servers'][$i]['auth_type'] = 'config';更改爲$cfg['Servers'][$i]['auth_type'] = 'http'//C:\xampp\phpMyAdmin\test\test_data\config.inc.php//C:\xampp\phpMyAdmin\config.inc.php重啓。ok!新版本的xammp能夠參考https://www.cnblogs.com/jonsea/p/5510219.html