DBM438 Lab 6 in MySQL – Instant Delivery – Perfect Solution
1. Take a look at the process of creating and managing users in the database, as well as how user management helps support security.
As a result of this lab, you will have gained a working knowledge of how to create users, grant privileges, and use those privileges to access data in the database.
1. For each lab it will be necessary for you to create an output file that will capture all of your commands and work within your MySQL session. The steps for doing this are as follows.
a. Create a folder on the S: drive of your Windows VM named DBM438. This will be where you will save all of your session output files.
b. Log into a MySQL session at the ‘root’ level. This will be the default beginning level for all of your iLab sessions.
c. At the mysql> prompt, type the following: tee s:\dbm438\labxoutputfile.log, where the ‘x’ is the lab number.
d. Press enter. You should receive a ‘Logging to ‘s:\dbm438\labxoutputfile.log’ message.
e. To stop writing to the log you simply type note at the prompt.
f. Unfortunately, you cannot copy this file from your VM to your host computer, so you will need to open the file, copy the contents, and then paste them into the Lab Report document for this lab under the Lab Results section. If you use Courier New 9pt. font, formatting will look just like in the session.
NOTE: If you have to stop your lab session and then go back later you need to be sure that you are using the same file name for your output file. Doing so will allow MySQL to append the new work to the end of the file thus allowing you to save all of your lab output into one file. If you do end up using two or more file names then you will need to copy and paste the contents of the second file into the first and thus just have one file to turn in.
2. Review the lecture in Week 6 for additional information that can be used for this lab.
3. Before starting this lab, you will need to download a file from Doc Sharing that will be run later during the lab. To download this file, do the following:
a. Log into eCollege from your VM and download the DBM438_Lab6.SQL file from Doc Sharing to your DBM438 directory on the S: drive in your VM. You will run this script in a later step.
4. Startup your MySQL session from the Windows Command Line window using localhost as the host, the root user and “devrydevry” password. Once you have the MySQL> prompt, be sure to start your output file printing as described at the beginning of this lab. Now you want to set the database to devrydbm438, which is the database that was created in Lab 2.
5. Now you are going to go through the process of creating several users, granting them certain privileges, and using those users and privileges. During this process it will be necessary to exit your session as one user and start a new one as another user, so be sure to keep track of your output files each time you have to start a new session. Let’s get started.
a. As the root user (you are currently logged in as root), create a user name BOB with a password of ALONG and associate the user with LOCALHOST.
b. Grant privileges to Bob that will allow the user to create tables and insert data, drop tables, and select and update data in the devrydbm438 database.
c. Now write the statement command that will show the grants for user BOB.
d. Exit out of this session and start a new one as the user BOB (remember to start a new output file). Once you are logged in and have started your new output file, set the database for the session to devrydbm438.
e. Once again, write the statement command that will show the privileges for the user, but remember that you are doing it as the user this time and not as root.
f. Exit out of this session and start a new one as the root user (remember to start a new output file).
g. Bob has forgotten his password, so assign Bob a new password of OLINK.
h. Grant user Bob the ability to create a temporary table, also limit the maximum number of connections the user can have per hour to 5.
i. Once again, write the statement command that will show the privileges for user BOB and also write the statement that will show the user resources for this user.
j. As the final step for this part of the lab, you need to run the Lab6_support.sql file that you downloaded. You can do this by using the word SOURCE followed by the path to the file (S:\DBM438\DBM438_lab6.sql) and then hitting the ENTER key.
6. We are now going to create a second user, so you will need to exit out of your current session (exit out only to the C:\ prompt) and reconnect as the root user. Be sure to start your output file once logged in to MySQL).
a. As the root user (you are currently logged in as root), create a user name JACK with a password of HORNOR and associate the user with LOCALHOST.
b. Grant privileges to Jack that will allow the user to create tables and insert data, drop tables, select data, update data, and create a temporary table in the devrydbm438 database.
c. Now write the statement command that will show the grants for user Jack.
d. Write and execute the query using the mysql.user table to show the host and user that currently exist.
e. Now exit out of your current session and log back in to MySQL as user Jack. Be sure to start your output file once you are logged in.
f. As user Jack, write a SELECT statement to show all of the data in STUDENT table in the SAMPDB database. What was the result? Add content to the Conclusions section of your Lab Report stating your findings and why this happened.
g. As user Jack, write a SELECT statement to show all of the data in the EMP table. Now write the CREATE statement that will create a temporary table named EmpTemp, based on the EMP table. Now write a SELECT statement to show all of the contents of the EmpTemp table you just created.
7. This concludes your lab. You will need to open the output file(s) for this lab on the S: drive of your VM, copy the contents of the file, and paste them into the Lab Report document for this lab under the Lab Results section. If you use Courier New 9pt. font, formatting will look just like in the session. This completes this lab.
8. Grading of this lab assignment will be based on the following:
Objectives section is sufficiently filled out. 5
Steps 3 through 7 were satisfactorily completed. 15
Contents of output file showing session input and results were included in the iLab Report. 15
Conclusions section is sufficiently filled out. 5
Total Lab Points: 50
* You can also use 2CO option if you want to purchase through Credit Cards/Paypal but make sure you put the correct billing information otherwise you wont be able to receive any download link.
* Your paypal has to be pre-loaded in order to complete the purchase or otherwise please discuss it with us at firstname.lastname@example.org.
* As soon as the payment is received, download link of the solution will automatically be sent to the address used in selected payment method.
* Please check your junk mails as the download link email might go there and please be patient for the download link email. Sometimes, due to server congestion, you may receive download link with a delay.
* All the contents are compressed in one zip folder.
* In case if you get stuck at any point during the payment process, please immediately contact us at email@example.com and we will fix it with you.
* We try our best to reach back to you on immediate basis. However, please wait for atleast 8 hours for a response from our side. Afterall, we are humans.
* Comments/Feedbacks are truely welcomed and there might be some incentives for you for the next lab/quiz/assignment.
* In case of any query, please donot hesitate to contact us at firstname.lastname@example.org.
* MOST IMPORTANT Please use the tutorials as a guide and they need NOT to be used for any submission. Just take help from the material.
******************************************** Good Luck ***************************************************
Any personal information received will only be used to fill your order. We will not sell or redistribute your information to anyone.
We will try our best to resolve the issue and if still persists we can discuss for a refund in case its required.