Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Pre-Lab 2 Assignment Objectives: to install and start using MySQL on your computer This is an individual lab. Each student has to complete all work

image text in transcribed
Pre-Lab 2 Assignment Objectives: to install and start using MySQL on your computer
This is an individual lab. Each student has to complete all work required in the lab, and submit all required materials exactly as specified in this assignment. We will use MySQL throughout the course.
MySQL is a client-server application, even if the client and server are running on the same machine. When you run a MySQL session, you are actually interacting with a client
program MySQL on your local lab machine, which then sends commands and retrieves data from the MySQL server (started automatically at system start-up or by invoking MySQL from the shell prompt). Your MySQL sessions will involve simple scrolling text only. You may use a GUI if you want, but it is not required, and I won't be able to answer GUI-related questions.
Tasks
In this lab, you will have to install MySQL on your computer and then write SQL commands.
1. Install and configure MySQL as specified in Lab 2 manual if you have not already installed it on your computer.
2. Startup MySQL client and login as a root user(admin rights)
3. Type the following commands:
SHOW DATABASES;
The above SQL command lists all databases on the MySQL server host. SHOW SCHEMAS is a synonym for SHOW DATABASES. Words given in all capitals are reserved words in SQL. Reserved words are case-insensitive, so you can enter them all lowercase if you want.
If you forgot to add the semicolon at the end of a SQL statement, just type the semicolon at the prompt in the next line and hit enter.
CREATE DATABASE yourLastName;
The above SQL command creates a new database with your last name.
o Example:CREATEDATABASEtsay;
o Substituting tasy with your own last name
If the database already exists, it will return an error message saying cant create database yourLastName; database exists.
SHOW DATABASES;
USE
The database with your last name is included in the list of the available databases.
YourLastName
;
The above statement tells the database server to select yourLastName database as the default database.
o Example: USE tsay;
If the database name is misspelled or not existed yet, it will return an error message saying Unknown database yourLastName.
SHOW TABLES
;
The above statement lists all available tables in the current database. Since we did not create any table yet, it will return a message saying
Empty set.
4. Take a screenshot of your MySQL clients that show all of the above commands. It should look like the following figure.
Preah Awe Objective to tell and starting MySQL on your computer This an individual lab. Each student has to complete all work required in the hand all required material actly as specified in this assignment. We will throughout the Mysona client-server application.com is the client and serverar uning the machine. When you run a Myslion, you actually interacting with it program Mysql on your local lab machine, which the commande date from the MySQL server started automatically at peper by SL the shell prompt) Your MySQL will be simple sending on my cull you want, but it is not required, and I were able wrique Tasks In this lab, you will have to install MySQL en your computer and the SOL.com 1. Install and configure MySQL specified in Lah2 memalf your base notedy it 2 Startup MySQL and linnaraamini 3. Type the following commande SHOW DATABASES The above SQL command lists all databases on the MySQL server host SHOW SCHEMAS Na Wym for SHOW DATABASES Words given in all capital are reserved werden Sol Reserved words are me, so you can enter the allowed you want > If you forgot to add the semicolon at the end of a Stement just type the semicolon at the prompt in the next line and the CREATE DATABASE The best commandes a new database with your name sample "CREATE DATABASE! Substituting tay with your own este If the databasery, will tumani can't mate date'dataset SHOW DATABASES The database with your last name in cated in the list of the USEY event date as the default database Example USB If the database e pelled or need to Uw data wa SHOW TABLES The show walements all able table in the current date Since we did not really it will remain "Empty 4. Take a lot of your MySQL clients that show all of the above.commandat should look like the following figure. Submit the same by 11:33 IM

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 11G SQL

Authors: Joan Casteel

2nd Edition

1133947360, 978-1133947363

More Books

Students also viewed these Databases questions