...

/

Exercise: User Management and Access Control

Exercise: User Management and Access Control

Practice and test your understanding of user management and access control.

Now it’s time to get some hands-on practice!

Question 1

For our OnlineStore, create a user named inventory_clerk who can only connect from IP addresses in the 10.10.20.x subnet. Assign the password Inv3ntoryCl3rk!.

Press + to interact
MySQL 8.0
-- Create an inventory_clerk user restricted to the 10.10.20.x subnet

If you’re stuck, click the “Show Solution” button.

Question 2

Given the following structure of the Products table:

Field

Type

ProductID

int

ProductName

varchar(50)

CategoryID

int

Price

decimal(10,2)

Stock

int

LastRestockDate

date

MonthlySales

int

InventoryTurnoverRate

decimal(5,2)

Where ProductID is the primary key and CategoryID is the foreign key from the Categories table. The table contains information about products.

Grant ...