【报错】DVWA遇到Could not connect to the database service. Please check the config file. Database Error

Project scenario:

Build a DVWA shooting range environment


Problem Description

DVWA encountered a database error

Could not connect to the database service. Please check the config file. Database Error #1045: Access denied for user 'dvwa'@'localhost' (using password: YES).

[External link image transfer failed, the source site may have an anti-leeching mechanism, it is recommended to save the image and upload it directly (img-2rXWihJn-1688997380612) (C:\Users\gf5971\AppData\Roaming\Typora\typora-user-images\ image-20230710213626625.png)]

Cause Analysis:

  1. $_DVWA[ 'db_database' ] parameter is changed to the DVWA database name (confirm whether the database name is correct in Xiaopi)
  2. $_DVWA[ 'db_password' ] The parameter is changed to the MYSQL database password, generally the default is root
  3. $_DVWA['db_user'] is changed to MYSQL database name root

solution:

Change both user and password to database user and password

insert image description here
insert image description here

Create the database again and log in successfully

insert image description here

Guess you like

Origin blog.csdn.net/weixin_48701521/article/details/131648798