0% found this document useful (0 votes)
13 views

Practical-1 Mysql Installation & Introduction

Uploaded by

nairananth20
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Practical-1 Mysql Installation & Introduction

Uploaded by

nairananth20
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Practical -1 Introduction to MYSQL and Installation

• Installation of MySQL
• Minimum Requirements for Windows
o Microsoft .NET Framework 4.5.2
o Microsoft Visual C++ Redistributable for Visual Studio 2019
o Microsoft Windows 10 or Windows Server 2019
Available at Microsoft download center
• Download the installer for the MySQL
o The general MySQL Installer download is available
at https://dev.mysql.com/downloads/windows/installer/
o Select the Mysql-installer-community.msi, click on download
o It will install MySQL workbench
• Installation Wizard
Step 1 : select the setuptype

Step 2 : Checking for the requirement


Based on your Windows configuration, it may prompt you like “One or more product requirements
have not been satisfied”. You can just click on YES

Step 3 : click on the execute button , It will install all required packages.

: It will install all the require packages


Step 4 : Upon successful execution of all required products, now the MySQL allows us to
configure the server settings. Click on Next to configure the server.
Step 5 : click on next to configure the server.

Select the standalone MySQL server option


Steps 6 : Click on Next for network and port configure.
Step 7 : Click on Next for select authentication method

Select strong password encryption option


Step 8 : give a password for the user. You can create a new user for the database

Step 9 : Leave the service details as default and click on Next.


Step 10 : Click on Next to configuration , then press on execute

Step 11 : click on finish after configure all.


Step 12 : For test, select start button ,-> select all program -> select MySql Command Line
Client
Step 13 : enter password , which set during installation
Step 14 :
• MySQL Introduction
MySQL was developed by Michael Widenius and David Axmark in 1994. Presently
MySQL is maintained by Oracle (formerly Sun, formerly MySQL AB).
MySQL is (as of July 2013) the world's most widely used open-source relational
database management system (RDBMS), enabling the cost-effective delivery of
reliable, high-performance and scalable Web-based and embedded database
applications.

• Reasons of popularity
o MySQL is an open-source database
o MySQL supports large databases, up to 50 million rows or more in a table,
Default size limit is 4 GB and it can be extends upto 8 TB for a table.
o MySQL uses a standard form of the well-known SQL data language.
o MySQL is very friendly with PHP, the most popular language for web
development.

• MySQL Features
o MySQL is a relational database management system.
o Easy to use: MySQL is easy to use. You have to get only the basic
knowledge of SQL.
o It is secure: MySQL consist of a solid data security layer that protects
sensitive data from intruders. Passwords are encrypted in MySQL.
o Client/ Server Architecture: MySQL follows a client /server
architecture. There is a database server (MySQL) and arbitrarily many
clients (application programs), which communicate with the server;
that is, they query data, save changes, etc.
o Allows roll-back: MySQL allows transactions to be rolled back,
commit and crash recovery.
o High Performance: MySQL is faster, more reliable and cheaper
because of its unique storage engine architecture.
o High Flexibility: MySQL supports a large number of embedded
applications which makes MySQL very flexible.
o High Productivity: MySQL uses Triggers, Stored procedures and views
which allows the developer to give a higher productivity
Numeric Datatype of MySQL

DATATYPE MAX SIZE


INT A normal-sized integer that can be signed or unsigned. If signed, the
allowable range is from -2147483648 to 2147483647. If unsigned,
the allowable range is from 0 to 4294967295. You can specify a
width of up to 11 digits.
TINYINT A very small integer that can be signed or unsigned. If signed, the
allowable range is from -128 to 127. If unsigned, the allowable range
is from 0 to 255. You can specify a width of up to 4 digits.
SMALLINT A small integer that can be signed or unsigned. If signed, the
allowable range is from -32768 to 32767. If unsigned, the allowable
range is from 0 to 65535. You can specify a width of up to 5 digits.
BIGINT A large integer that can be signed or unsigned. If signed, the
allowable range is from -9223372036854775808 to
9223372036854775807. If unsigned, the allowable range is from 0
to 18446744073709551615. You can specify a width of up to 20
digits.

FLOAT(m,d) You can define the display length (m) and the number of decimals
(d). This is not required and will default to 10,2, where 2 is the
number of decimals and 10 is the total number of digits (including
decimals). Decimal precision can go to 24 places for a float.
DOUBLE(m,d) (d). This is not required and will default to 16,4, where 4 is the
number of decimals. Decimal precision can go to 53 places for a
double.

Date & Time Datatypes

DATATYPE MAX SIZE EXPLATION


DATE Values range from '1000-01-01' to Displayed as 'yyyy-mm-dd'
'9999-12-31'.

DATETIME Values range from '1000-01-01 Displayed as 'yyyy-mm-dd


00:00:00' to '9999-12-31 23:59:59'. hh:mm:ss'.

TIME Values range from '-838:59:59' to Displayed as 'HH:MM:SS'


'838:59:59'.

String Data Types:


DATATYPE MAX SIZE EXPLATION
CHAR(size) Maximum size of 255 Where size is the number of
characters to store. Fixed-
length strings. Space padded
on right to equal size
characters.
VARCHAR(size) Maximum size of 255 Where size is the number of
characters. characters to store. Variable-
length string.
TEXT(size) Maximum size Where size is the number of
of 65,535 characters characters to store
LONGTEXT(size) Maximum size upto 4 GB Where size is the number of
characters characters to store.
VARBINARY(size) Maximum size of 255 Where size is the number of
characters. binary characters to store.
Variable-length string.
(introduced in MySQL 4.1.2)

Large Object Data Types (LOB) Data Types:


DATATYPE MAX SIZE EXPLATION
TINYBLOB Maximum size of 255 bytes.

BLOB(size) Maximum size of 65,535 bytes. Used to store the image in


database

Exercise :

1. Install MySQL

2. Type command in mysql prompt for testing


> show databases;
3. Define the datatype and size for the following information.
• Name of the person
• Birthdate of the person
• Salary of the person
• Age of the person
• Student percentage

You might also like