Error: Table ‘bWAPP.users‘ doesn‘t exist

简介: Error: Table ‘bWAPP.users‘ doesn‘t exist

数据库bwapp不存在;这是因为建立数据库的文件不能建立数据库,所以这里我们手动建立一个数据库。


首先连接数据库:

[root@localhost /]# mysql -uroot -p

输入数据库root用户密码

Create database bwapp; //数据库名和配置文件中的要一致

有了数据库,接下来需要手动建立数据库中的表,并在表中添加数据

代码如下:

使用数据库bwapp:
use bwapp;


创建blog表:

CREATE TABLE blog (
  id int(10) NOT NULL ,
  owner varchar(100) DEFAULT NULL,
  entry varchar(500) DEFAULT NULL,
  date datetime DEFAULT NULL,
  PRIMARY KEY (id)
);

创建heroes表:

CREATE TABLE heroes (
  id int(10) NOT NULL ,
  login varchar(100) DEFAULT NULL,
  password varchar(100) DEFAULT NULL,
  secret varchar(100) DEFAULT NULL,
  PRIMARY KEY (id)
);

heroes表添加数据:

INSERT INTO heroes VALUES (1, 'neo', 'trinity', 'Oh why didn''t I took that BLACK pill?');
INSERT INTO heroes VALUES (2, 'alice', 'loveZombies', 'There''s a cure!');
INSERT INTO heroes VALUES (3, 'thor', 'Asgard', 'Oh, no... this is Earth... isn''t it?');
INSERT INTO heroes VALUES (4, 'wolverine', 'Log@N', 'What''s a Magneto?');
INSERT INTO heroes VALUES (5, 'johnny', 'm3ph1st0ph3l3s', 'I''m the Ghost Rider!');
INSERT INTO heroes VALUES (6, 'seline', 'm00n', 'It wasn''t the Lycans. It was you.');

创建movies表:

CREATE TABLE movies (
  id int(10) NOT NULL ,
  title varchar(100) DEFAULT NULL,
  release_year varchar(100) DEFAULT NULL,
  genre varchar(100) DEFAULT NULL,
  main_character varchar(100) DEFAULT NULL,
  imdb varchar(100) DEFAULT NULL,
  PRIMARY KEY (id)
);

movies表添加数据:

INSERT INTO movies VALUES (1, 'G.I. Joe: Retaliation', 2013, 'action', 'Cobra Commander', 'tt1583421');
INSERT INTO movies VALUES (2, 'Iron Man', 2008, 'action', 'Tony Stark', 'tt0371746');
INSERT INTO movies VALUES (3, 'Man of Steel', 2013, 'action', 'Clark Kent', 'tt0770828');
INSERT INTO movies VALUES (4, 'Terminator Salvation', 2009, 'sci-fi', 'John Connor', 'tt0438488');
INSERT INTO movies VALUES (5, 'The Amazing Spider-Man', 2012, 'action', 'Peter Parker', 'tt0948470');
INSERT INTO movies VALUES (6, 'The Cabin in the Woods', 2011, 'horror', 'Some zombies', 'tt1259521');
INSERT INTO movies VALUES (7, 'The Dark Knight Rises', 2012, 'action', 'Bruce Wayne', 'tt1345836');
INSERT INTO movies VALUES (8, 'The Incredible Hulk', 2008, 'action', 'Bruce Banner', 'tt0800080');
INSERT INTO movies VALUES (9, 'World War Z', 2013, 'horror', 'Gerry Lane', 'tt0816711');

创建users表:

CREATE TABLE users (
  id int(10) NOT NULL ,
  login varchar(100) DEFAULT NULL,
  password varchar(100) DEFAULT NULL,
  email varchar(100) DEFAULT NULL,
  secret varchar(100) DEFAULT NULL,
  activation_code varchar(100) DEFAULT NULL,
  activated tinyint(1) DEFAULT '0',
  reset_code varchar(100) DEFAULT NULL,
  admin tinyint(1) DEFAULT '0',
  PRIMARY KEY (id)
);

users表添加数据:

INSERT INTO users VALUES (1, 'A.I.M.', '6885858486f31043e5839c735d99457f045affd0', 'bwapp-aim@mailinator.com', 'A.I.M. or Authentication Is Missing', null, 1, null, 1);
INSERT INTO users VALUES (2, 'bee', '6885858486f31043e5839c735d99457f045affd0', 'bwapp-bee@mailinator.com', 'Any bugs?', null, 1, null, 0);


重新启动数据库:systemctl restart mariadb

有了数据库之后再次输入用户名bee,密码bug,就可以成功登陆bWAPP靶场了

相关文章
|
9天前
|
关系型数据库 MySQL 数据安全/隐私保护
问题:ERROR 1819 (HY000) Your password does not satisfy the current policy requirements
问题:ERROR 1819 (HY000) Your password does not satisfy the current policy requirements
12 0
|
2月前
|
安全 关系型数据库 MySQL
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements问题处理
【5月更文挑战第8天】ERROR 1819 (HY000): Your password does not satisfy the current policy requirements问题处理
24 2
|
2月前
|
安全 关系型数据库 MySQL
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
20 2
|
关系型数据库 MySQL 数据安全/隐私保护
|
SQL
ORA-02292: integrity constraint (xxxx) violated - child record found
在更新表的主键字段或DELETE数据时,如果遇到ORA-02292: integrity constraint (xxxx) violated - child record found 这个是因为主外键关系,下面借助一个小列子来描述一下这个错误: SQL> create table studen...
2214 0
|
Oracle 关系型数据库
Mandatory Patching Requirement for Database Versions 11.2.0.3 or Earlier, Using DB Links (DOC ID 2335265.1)
Mandatory Patching Requirement for Database Versions 11.2.0.3 or Earlier, Using DB Links (DOC ID 2335265.
2778 0