kali DVWA提示Could not connect to the MySQL service. Please check the config file

尝试了许多方法,最后的解决方式如下

mysql数据库,即出现的MariaDB,创建一个非root用户

create user 'dvwauser'@'localhost' identified by ''; //用户名位dvwauser,密码为空

grant all on *.* to 'dvwa'@'localhost'; #赋权

flush privileges;#刷新MySQL的系统权限相关表

quit #退出mysql

然后修改/var/www/html/dvwa/config/下的config.inc.php配置文件,

包括$_DVWA[ 'db_user' ],$_DVWA[ 'db_password' ] 

启动apache2

service apache2 restart

你可能感兴趣的:(kali DVWA提示Could not connect to the MySQL service. Please check the config file)