-
Download all the requirements from the
requirements.txt -
Start your mariadb server
- On linux
sudo systemctl start mariadb
- On Windows
??
- On Mac
??
- On linux
-
Create a user to connect to in mariadb
CREATE USER 'sample'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON . TO 'sample'@'localhost'; FLUSH PRIVILEGES
-
Make two tables
-
supermarket_users
-
Then run this:
DROP TABLE IF EXISTS
users; CREATE TABLEusers(idint(11) NOT NULL AUTO_INCREMENT,usernamevarchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,passwordvarchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,created_atdatetime DEFAULT current_timestamp(),rolevarchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, PRIMARY KEY (id), UNIQUE KEYusername(username) ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 > COLLATE=utf8mb4_unicode_ci; -
Hash your password here : https://passwordsgenerator.net/sha256-hash-generator/
-
run this
INSERT INTO
usersVALUES (1,'YOUR_USERNAME','YOUR_HASHED_PASSWORD', 'manager')
-
-
supermarket_products