Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Create a MySQL data base and call it csit 101. Now let's create a table and call it administrators. This ta ble contains five fields:
Create a MySQL data base and call it csit 101. Now let's create a table and call it administrators. This ta ble contains five fields: adminID, email, and password, firs tName and lastName The following shows the sql file that generates the database and the required table. It also populates with three users whose email addresses are j@gmail.com, kk@gmail.com, and sd@gmail.com create and select the database DROP DATABASE IF EXISTS CSIT101; CREATE DATABASE CSIT101 USE CSIT 101 CREATE TABLE administrators adminID email password VARCHAR(255) NOT NULL, firstName VARCHAR(255) NOT NULL lastName VARCHAR(255) NOT NULL, PRIMARY KEY (adminlD) INT VARCHAR(255) NOT NULL, NOT NULL AUTO INCREMENT INSERT INTO administrators (adminlD, email, password, firstName, last Name) VALUES (1, ij@gmail.com, 'sesame', John', Johnson (2, kk@gmail.com, password', 'Karen', 'King (B, 'sd@gmail.com, 'superman', 'Super', 'Duper") - Create a user named super GRANT SELECT, INSERT, UPDATE, DELETE ON TO super@localhost IDENTIFIED BY 'super'; In normal case, one shall hash the password so that it is encrypted but we did not hash the password here. The main purpose for creating the user named super is for use in the creating of PDO. Recall that in order to create a PDO we need a user who have the credential to access the required database. Although we don't need to grant full privileges to this user in order to run this lab, but we may use it later for other exercises
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started