Skip to content

Commit

Permalink
Add connection refused troubleshooting
Browse files Browse the repository at this point in the history
  • Loading branch information
digininja authored Apr 18, 2024
1 parent 1232568 commit f9d786b
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,46 @@ This is not an authentication issue but tells you that the database server is no
sudo service mysql start
```
### Connection Refused
An error similar to this one:
```
Fatal error: Uncaught mysqli_sql_exception: Connection refused in /var/sites/dvwa/non-secure/htdocs/dvwa/includes/dvwaPage.inc.php:535
```
Means your database server is not running or you've got the wrong IP address in the config file.
Check this line in the config file to see where the database server is expected to be:
```
$_DVWA[ 'db_server' ] = '127.0.0.1';
```
Then go to this server and check that it is running. In Linux this can be done with:
```
systemctl status mariadb.service
```
And you are looking for something like this, the important bit is that it says `active (running)`.
```
● mariadb.service - MariaDB 10.5.19 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; preset: enabled)
Active: active (running) since Thu 2024-03-14 16:04:25 GMT; 1 week 5 days ago
```
If it is not running, you can start it with:
```
sudo systemctl stop mariadb.service
```
Note the `sudo` and make sure you put your Linux user password in if requested.
In Windows, check the status in the XAMPP console.
### Unknown authentication method
With the most recent versions of MySQL, PHP can no longer talk to the database in its default configuration. If you try to run the setup script and get the following message it means you have configuration.
Expand Down

2 comments on commit f9d786b

@hellboy-sup
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2024-04-24 200049
after giving username as "admin" and password as "password" it is showing CSRF token is incorrect

@digininja
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please put this as an issue, not a comment on a commit, that is not how you use GitHub.

Please sign in to comment.