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靶场了

相关文章
|
2月前
|
SQL 容灾 关系型数据库
PSQLException: ERROR: column “xxxxx“ does not exist
PSQLException: ERROR: column “xxxxx“ does not exist
75 0
|
6月前
ERROR: No matching distribution found for tb-nightly
ERROR: No matching distribution found for tb-nightly
203 1
|
关系型数据库 MySQL Linux
SQLSTATE[HY000]: General error: 1364 Field ‘xxx’ doesn't have a default value 解决办法
SQLSTATE[HY000]: General error: 1364 Field ‘xxx’ doesn't have a default value 解决办法
1543 0
|
数据安全/隐私保护 索引
报错:SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'admin'
报错:SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'admin'
476 0
|
Linux
WARNING: Re-reading the partition table failed with error 22: Invalid argument
在划分磁盘分区时,遇到错误“WARNING: Re-reading the partition table failed with error 22: Invalid argument” 如下所示: [root@DB-Server u02]# fdisk -l   Disk /dev/sda: 500.
2541 0
|
关系型数据库 MySQL 数据库
[Err] 1143 - SELECT command denied to user 'XX'@'%' for column 'XXX' in table 'XX'
[Err] 1143 - SELECT command denied to user 'XX'@'%' for column 'XXX' in table 'XX'
281 0
[Err] 1143 - SELECT command denied to user 'XX'@'%' for column 'XXX' in table 'XX'
|
SQL
ORA-02292: integrity constraint (xxxx) violated - child record found
在更新表的主键字段或DELETE数据时,如果遇到ORA-02292: integrity constraint (xxxx) violated - child record found 这个是因为主外键关系,下面借助一个小列子来描述一下这个错误: SQL> create table studen...
2378 0
|
SQL 关系型数据库 MySQL