Transcript PHPMyAdmin

PHPMyAdmin
• Web application
• Makes it easier to use MySQL
• To launch: http://localhost/phpmyadmin/
• Download it here:
http://www.phpmyadmin.net/home_page
/downloads.php
Create Database
You are
logged in
as “root”
QuickTime™ and a
TIFF (LZW) decompressor
are needed to see this picture.
To get back to this
page at any time
select “Databases”
Enter name
of database
here and
click
“Create”
Create Table
SQL query used
to create
“ensmartdb”
QuickTime™ and a
TIFF (LZW) decompressor
are needed to see this picture.
We are
currently
using this
database
Enter table name and
number of fields then
click “Go”
We are defining
the columns for
table “gene”
Define Columns
Select
“auto_increment”
here
QuickTime™ and a
TIFF (LZW) decompressor
are needed to see this picture.
Don’t forget to
click “Save”!
Select “Primary”
here since this is
the primary key
Select
“ensmartdb”
to view
tables in
database
Click “gene”
to view
“gene” table
View Database
QuickTime™ and a
TIFF (LZW) decompressor
are needed to see this picture.
Add another
table here
Insert Data
Click on
“insert” to
add data to
table
QuickTime™ and a
TIFF (LZW) decompressor
are needed to see this picture.
Don’t forget to
save by clicking
“Go”!
Click on “Browse”
to
view/edit/delete
data
View/Delete/Edit Data
QuickTime™ and a
TIFF (LZW) decompressor
are needed to see this picture.
Check rows to
edit or delete
Click here to delete
checked rows
Click here to edit
checked rows
Database Users
• To use MySQL you must have a username
and password
• A user in MySQL has permissions set
regarding
– MySQL itself (ex. whether or not the user can create a
database)
– Specific databases within MySQL
• For example, user “guest” may have permission to view database
“x” but not database “y”
• Multiple users can access a MySQL database
simultaneously
Granting a User Privileges
• PHPMyAdmin is logged
in as user “root”, and has
permission to do anything
• You should NOT make a
habit of connecting to
your database as root
• Create a user with
restricted permissions to
your database instead
QuickTime™ and a
TIFF (LZW) decompressor
are needed to see this picture.
Click “Add new
User”
Granting a User Privileges
(Continued)
Enter “User name”,
“Host”, and
“Password”
This are privileges the
user will have on ALL
databases
Granting a User Privileges
(Continued)
After you save the
“global” permissions,
you may add database
specific permissions
QuickTime™ and a
TIFF (LZW) decompressor
are needed to see this picture.
Select “ensmartdb” to edit
user permissions for
database “ensmartdb”
On the next screen select ONLY the
permissions the user must have