sqli-labs-靶场搭建问题
-
前提是将源文件解压到WWW目录下
-
数据库密码错误mysqli_real_connect(): (HY000/1045): Access denied for user 'admin'@'localhost' (using password: YES)
mysqli_real_connect(): (HY000/1045): Access denied for user 'admin'@'localhost' (using password: YES)
打开文件更改账户密码,与phpstudy设置的一样即可
-
导入数据库
-
关于SQL注入报错:Illegal mix of collations for operation ‘UNION‘
在这个目录下输入cmd
mysql -u root -p #登录数据库
show databases;#查看数据库
ues security;#使用security数据库
show create tables users;
ues information_schema;
show create information_schema.table;#查看信息
两种编码格式不一样导致报错,修改成一样的就可以了
use security
alter table users modify username varchar(20) character set utf8 collate utf8_general_ci;
alter table users modify password varchar(20) character set utf8 collate utf8_general_ci;
成功