How To Fix bWAPP Unknown Database Error Windows/Linux

1 month ago 31
BOOK THIS SPACE FOR AD
ARTICLE AD

Hamza Avvan

If you’re diving into the realm of ethical hacking, you’ve encountered juicy terms like XSS, SQLi, RCE, bounties, dollars, money, and more. But to master finding these vulnerabilities and earning 💰bounties, you need a platform to hone your skills. That’s where bWAPP steps in, saving us noobs by providing a playground to practice and learn.

bWAPP, short for buggy web application, is a freely accessible and deliberately insecure web app. It’s a playground for security buffs, developers, and students, offering hands-on experience in spotting and fixing web vulnerabilities.

With a whopping 100+ bugs, it’s a goldmine for honing penetration testing and ethical hacking skills. Plus, it’s got you covered on all fronts, including the infamous OWASP Top 10 risks.

For more information: http://www.itsecgames.com/

Download bWAPP: https://sourceforge.net/projects/bwapp/files/latest/download

Common Error

While setting up the bWAPP, most of us noobs with no programming background face extreme challenges in its deployment and setting up the database, thus we lose our motivation and in despair, we cry in a corner.

But fear not, after spending many years of programming and investing my time into bug bounties I’ve come up with a useful technique that can conquer this nightmare. Commonly, we get these errors shown below in screenshots.

Warning: mysqli::__construct(): (HY000/1049): Unknown database ‘bwapp’
Fatal error: Uncaught mysqli_sql_exception: Unknown database ‘bwapp’

After spending some time researching the cause of the above (Fatal) error, it is discovered that most of the PHP distributions might come up with MYSQLI_REPORT_STRICTset by default due to which the warning turns into a fatal error as described on the PHP page.

If, in addition, the mode is set to MYSQLI_REPORT_STRICT, a mysqli_sql_exception is thrown instead.

So to fix this issue we can just turn it off by adding a new line before the logical check during the installation of the bWAPP and everything will go buttery smooth.

mysqli_report(MYSQLI_REPORT_OFF);

After adding the above line it will fix the issue and the bWAPP will be installed successfully therefore you will be able to begin your ethical hacking adventure without any trouble.

Successfully installed bWAPP
Read Entire Article