00:01
In this question, we have to write a code in mysql.
00:06
So, we'll see at the basic idea that we have to do.
00:12
So, first we have to connect to mysql as a privileged user.
00:17
Then we have to run certain commands to create the user to grant the privileges that are there.
00:24
So, we have to note that we have to replace your username that we've seen in the code with our desired username that is whatever your username will be and your password with your desired password.
00:51
This we have to note these two things.
00:55
Then we have to make sure that the necessary privileges to create users and grant privileges.
01:01
We have to run the script in a mysql client or through the command line using the mysql command.
01:08
It's like this.
01:16
So, we have to note that granting select, insert and delete privileges for specific tables.
01:22
Assume that the user has access to those tables.
01:27
So, we'll see how we'll do this in mysql.
01:31
I'll just use a basic compiler just to show you the code.
01:35
So, first as i said, i will write those things down as they are necessary.
01:41
We have to create these things that are there.
01:45
Then we have to create the user with our desired name and password.
01:51
So, this is the first thing that we'll do using this create command that is there.
01:57
So, as we can see create user that is this.
02:03
This line creates a new user in mysql with the specified username that is this and password that is this.
02:11
And the at and percent is this denotes that the user can connect from any compute.
02:18
So, now we have to grant privileges for my github shop database.
02:24
So, that we have to write these statements further as you can see over here.
02:32
So, what does these statements mean that grant select, insert, update, delete on my github shop dot customers to your customers.
02:43
So, this line that you can see all these lines.
02:46
So, let us look at the first line.
02:48
So, this line grants the select or insert update and delete privileges on the customers table of the my github shop database to the user that is your name.
02:58
So, this allows the user to perform those operations on the customers table that is there...