1. 程式人生 > >xampp中修改mysql默認空密碼

xampp中修改mysql默認空密碼

圖片 min 數據 sqli 目錄 ima cat 相關信息 mysql數據庫

  打卡記錄:

  1. mysql用戶的相關信息是保存在mysql數據庫的user表中的,並且該表的密碼字段(Password)是通過PASSWORD方法加密存儲的,所以不能直接修改成123456。

  技術分享圖片

  2. 修改phpmyadmin的登錄密碼。

  找到phpMyadmin的配置文件,即phpMyAdmin目錄下的config.inc.php,找到如下代碼並修改:

  /* Authentication type and info */
  $cfg[‘Servers‘][$i][‘auth_type‘] = ‘config‘;
  $cfg[‘Servers‘][$i][‘user‘] = ‘root‘;
  $cfg[‘Servers‘][$i][‘password‘] = ‘123456

‘;
  $cfg[‘Servers‘][$i][‘extension‘] = ‘mysqli‘;
  $cfg[‘Servers‘][$i][‘AllowNoPassword‘] = true;

  記錄完畢。

xampp中修改mysql默認空密碼