Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while setting up the database #23

Open
arty-hlr opened this issue Aug 16, 2019 · 5 comments
Open

Error while setting up the database #23

arty-hlr opened this issue Aug 16, 2019 · 5 comments

Comments

@arty-hlr
Copy link

Hi,

I still get this error while trying to set up the database:

SETTING UP THE DATABASE SCHEMA AND POPULATING DATA IN TABLES:


\n";} else {echo "[*]...................Error purging database: " . mysql_error(); echo "

\n";} //Creating new database security $sql="CREATE database `security` CHARACTER SET `gbk` "; if (mysql_query($sql)) {echo "[*]...................Creating New database 'SECURITY' successfully";echo "

\n";} else {echo "[*]...................Error creating database: " . mysql_error();echo "

\n";} //creating table users $sql="CREATE TABLE security.users (id int(3) NOT NULL AUTO_INCREMENT, username varchar(20) NOT NULL, password varchar(20) NOT NULL, PRIMARY KEY (id))"; if (mysql_query($sql)) {echo "[*]...................Creating New Table 'USERS' successfully";echo "

\n";} else {echo "[*]...................Error creating Table: " . mysql_error();echo "

\n";} //creating table emails $sql="CREATE TABLE security.emails ( id int(3)NOT NULL AUTO_INCREMENT, email_id varchar(30) NOT NULL, PRIMARY KEY (id) )"; if (mysql_query($sql)) {echo "[*]...................Creating New Table 'EMAILS' successfully"; echo "

\n";} else {echo "[*]...................Error creating Table: " . mysql_error();echo "

\n";} //creating table uagents $sql="CREATE TABLE security.uagents ( id int(3)NOT NULL AUTO_INCREMENT, uagent varchar(256) NOT NULL, ip_address varchar(35) NOT NULL, username varchar(20) NOT NULL, PRIMARY KEY (id) )"; if (mysql_query($sql)) {echo "[*]...................Creating New Table 'UAGENTS' successfully";echo "

\n";} else {echo "[*]...................Error creating Table: " . mysql_error();echo "

\n";} //creating table referers $sql="CREATE TABLE security.referers ( id int(3)NOT NULL AUTO_INCREMENT, referer varchar(256) NOT NULL, ip_address varchar(35) NOT NULL, PRIMARY KEY (id) )"; if (mysql_query($sql)) {echo "[*]...................Creating New Table 'REFERERS' successfully";echo "

\n";} else {echo "[*]...................Error creating Table: " . mysql_error();echo "

\n";} //inserting data $sql="INSERT INTO security.users (id, username, password) VALUES ('1', 'Dumb', 'Dumb'), ('2', 'Angelina', 'I-kill-you'), ('3', 'Dummy', 'p@ssword'), ('4', 'secure', 'crappy'), ('5', 'stupid', 'stupidity'), ('6', 'superman', 'genious'), ('7', 'batman', 'mob!le'), ('8', 'admin', 'admin'), ('9', 'admin1', 'admin1'), ('10', 'admin2', 'admin2'), ('11', 'admin3', 'admin3'), ('12', 'dhakkan', 'dumbo'), ('14', 'admin4', 'admin4')"; if (mysql_query($sql)) {echo "[*]...................Inserted data correctly into table 'USERS'";echo "

\n";} else {echo "[*]...................Error inserting data: " . mysql_error();echo "

\n";} //inserting data $sql="INSERT INTO `security`.`emails` (id, email_id) VALUES ('1', 'Dumb@dhakkan.com'), ('2', 'Angel@iloveu.com'), ('3', 'Dummy@dhakkan.local'), ('4', 'secure@dhakkan.local'), ('5', 'stupid@dhakkan.local'), ('6', 'superman@dhakkan.local'), ('7', 'batman@dhakkan.local'), ('8', 'admin@dhakkan.com')"; if (mysql_query($sql)) {echo "[*]...................Inserted data correctly into table 'EMAILS'";echo "

\n";} else {echo "[*]...................Error inserting data: " . mysql_error();echo "

\n";} //CREATE TABLE security.search (id int(3) NOT NULL AUTO_INCREMENT, search varchar(20) NOT NULL, PRIMARY KEY (id)); //INSERT INTO `security`.`search` (search) VALUES ( 'Dumb@dhakkan.com'), ('Angel@iloveu.com'), ('Dummy@dhakkan.local'), ( 'secure@dhakkan.local'), ( 'stupid@dhakkan.local'), ( 'superman@dhakkan.local'), ( 'batman@dhakkan.local'), ( 'admin@dhakkan.com')"; //including the Challenges DB creation file. include("../sql-connections/setup-db-challenge.php"); ?> 

even though I have php5.6. Anything else I might try?

Best,

Florian

@M0ng0lFalcon
Copy link

me too

@escray
Copy link

escray commented Feb 29, 2020

me too

MacOS Catalina 10.15.13
MySQL 8.0.13
Apache/2.4.41 (Unix)
PHP 7.1.33

@Sobitan
Copy link

Sobitan commented Sep 13, 2020

You can check for the solutions on here. (#11)
Also kindly share if you get a solution to it also
Good luck

@LRS-home-0701
Copy link

Me too!我也是的!

@ShareTheWorld
Copy link

me too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants