KEMBAR78
Mysql: MIS 21 - Introduction To Applications Development | PDF
0% found this document useful (0 votes)
53 views11 pages

Mysql: MIS 21 - Introduction To Applications Development

MySQL is an open-source database developed by MySQL AB and currently owned by Oracle. It is inexpensive or free, optimized for networks, and can handle large quantities of data across many platforms like Windows, Mac, and Linux. Users log into MySQL using the mysql command and a username and password to execute queries and commands.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views11 pages

Mysql: MIS 21 - Introduction To Applications Development

MySQL is an open-source database developed by MySQL AB and currently owned by Oracle. It is inexpensive or free, optimized for networks, and can handle large quantities of data across many platforms like Windows, Mac, and Linux. Users log into MySQL using the mysql command and a username and password to execute queries and commands.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 11

MySQL

MIS 21 – Introduction to Applications Development


Databases
Some of the common databases used
 Microsoft Access
 Microsoft SQL Server
 MySQL
 Oracle
 PostgreSQL
MySQL
 Developed by the company MySQL AB
 Currently owned by Oracle Corp
 Oneof the popular open-source
databases
Advantages of MySQL over Microsoft Access

 Inexpensive or free
 Optimized for networks
 Can handle large quantities of data
 Available
over many platforms
(Windows, Mac, Linux)
Logging in to MySQL
 Login by using the command:
 mysql -u root -p
 Type root as password
 All
MySQL commands, including queries (e.g.
SELECT) will be done while logged in
 Ifthe command is not recognized, go to the bin folder
of MySQL via the command prompt
 cd "C:\Program Files\MySQL\MySQL Server
5.0\bin"
Displaying Databases
 Use the command below to get a list of
the databases in your computer’s
MySQL
 NOTE: Do not forget the semi-colon after
each command
 show databases;
Creating and Removing a Database
 When making a new database, use:
 create database school;

 And removing an existing database, use:


 drop database school;
 NOTE: There is no undo when deleting in
MySQL. It is important to have backup files.
Creating a Backup File
 Tocreate backup file, logout of MySQL by
typing quit
 Usemysqldump to copy the structure and
contents of a database to a backup file
 mysqldump -u root -p school >
"backup2.sql"
Restoring a Backup File
 Torestore a backup file, logout of MySQL
by typing quit
 Usemysql to copy the structure and
contents of a database from a backup file
 mysql -u root -p school <
"backup.sql"
Using a Database and Listing
Tables
 Toexecute queries, login MySQL and type
the command:
 use school;
 This allows MySQL to know which database to
use when querying
 To get the tables in a database, use:
 show tables;
Displaying the Structure of a Table

Ifyou want to get the fields and


types of each field of a particular
table, use the command:
 describe student;

You might also like