【报错】sqli-labs靶场搭建出现“Unable to connect to the database: security”

问题描述

搭建sqli-labs靶场时,在配置好PHP和mysql以及db-creds.inc配置文件后

初始界面可以运行,但点击关卡报错

图片.png

提示连接不到数据库

Unable to connect to the database: security

图片.png

解决方案:

1、数据库配置出错,先查看db-creds.inc配置文件中数据库密码是否正确

使用小皮的话,默认root

在这里插入图片描述

2、在靶场首页重新创建数据库

点击setup

在这里插入图片描述

然后出现该界面后,创建成功

图片.png

再次打开靶场关卡

http://localhost/sqli-labs-php7-master/Less-1/

成功

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_48701521/article/details/131928011