Database Credentials
Configure database connection settings inconfig/config.inc.php:
Step 3: Verify Credentials
Test the database connection from the command line:Environment Variables
| Variable | Value | Purpose |
|---|---|---|
MYSQL_ROOT_PASSWORD | dvwa | Root password |
MYSQL_DATABASE | dvwa | Auto-created database |
MYSQL_USER | dvwa | Auto-created user |
MYSQL_PASSWORD | p@ssw0rd | User password |
DVWA Service Configuration
The DVWA container connects to the database:Reset SQLite Database
If you corrupt the database during testing:- Recreate the database user with the correct password
Database Does Not Exist
If you see:- Verify
db_databasesetting - Create the database:
- Restart MySQL:
Database Server Not Running
If you see:Next Steps
After database setup:- Complete the web-based database initialization
- Log in with default credentials (admin/password)
- Configure security levels
- Start testing vulnerabilities!
