问题一:Your database user is root, if you are using MariaDB, this will not work, please read the README.md file
如图,说明数据库是MariaDB,user不能用root。文件/htdocs/dvwa/config/config.inc.php中$_DVWA[ 'db_user' ] = 'root'
改为$_DVWA[ 'db_user' ] = 'dvwa'
问题二:Could not connect to the database service.Please check the config file.Database Error #2002: 拒绝连接.
如图所示,查了许多文章都解决不了,结果把 $_DVWA[ 'db_server' ] = '127.0.0.1';
改成$_DVWA[ 'db_server' ] = 'localhost';
就行了。好多文章都是让把localhost改成127.0.0.1的,没想到是反过来的,不知道是不是因为kali的原因。搞不懂。