0

I am trying to run DVWA in my website hosting but i have a problem:
This application at fist time needs to create mysql databases and it needs just click on a button but in my case it can't and application says something is wrong with config.inc.php.
This is my config.inc.php:

<?php

# If you are having problems connecting to the MySQL database and all of the variables below are correct
# try changing the 'db_server' variable from localhost to 127.0.0.1. Fixes a problem due to sockets.
# Thanks to digininja for the fix.

# Database management system to use

$DBMS = 'MySQL';
#$DBMS = 'PGSQL';

# Database variables
# WARNING: The database specified under db_database WILL BE ENTIRELY DELETED during setup. 
# Please use a database dedicated to DVWA.

$_DVWA = array();
$_DVWA[ 'db_server' ] = 'localhost';
$_DVWA[ 'db_database' ] = 'dvwa';
$_DVWA[ 'db_user' ] = 'root';
$_DVWA[ 'db_password' ] = '1234567';

# Only needed for PGSQL
$_DVWA[ 'db_port' ] = '5432'; 

# ReCAPTCHA Settings
# Get your keys at https://www.google.com/recaptcha/admin/create
$_DVWA['recaptcha_public_key'] = "";
$_DVWA['recaptcha_private_key'] = "";

# Default Security Level
# The default is high, you may wish to set this to either low or medium.
# If you specify an invalid level, DVWA will default to high.
$_DVWA['default_security_level'] = "high";

?>

What is wrong?I think maybe i should change db_server but i don't know how?

migrated from webapps.stackexchange.com Dec 23 '14 at 16:55

This question came from our site for power users of web applications.

1

Is MySQL installed on the server and is the root MySQL password the one listed in the DVWA configuration file? I.e., is it the one specified for db_password in the configuration file? Note: the MySQL root account password is not necessarily the same as the login password for the root account.

You can verify that MySQL is installed by entering the command "which mysql" at a shell prompt. You should see something similar to the following, though the location might not be /usr/bin on your server:

$ which mysql
/usr/bin/mysql

You can check that the password you have in the configuration file is the correct one from a shell prompt with the command below:

mysql -u root -p

That will lead to MySQL prompting you for the password for its root account.

If you don't know the MySQL root password, but do know the login password for the root account, you can find instructions on resetting the password for the MySQL root account at Reset Forgotten MySQL Root Password.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.