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
77 0
|
6月前
ERROR: No matching distribution found for tb-nightly
ERROR: No matching distribution found for tb-nightly
210 1
|
关系型数据库 MySQL SQL
[解决] Error Code: 1044. Access denied for user 'root'@'%' to database
今天在测试集群用的mysql上,遇到个权限的问题: SQLException : SQL state: 42000 com.mysql.jdbc.exceptions.
5440 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'
|
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.
2806 0
|
SQL 关系型数据库 MySQL