Sunteți pe pagina 1din 48

1

phpMyAdmin: MySQL Front-


end
Marc Delisle

phpMyAdmin development team

Marc@phpmyadmin.net

April 19, 2005

2
Contents
•Introduction
•Interface overview
•Advanced features
•System management
•Q&A

3
Marc Delisle
(a.k.a. lem9)

• Network manager, web developer


• Made multi-language PMA (1998)
• Actively involved in PMA development
since 2001
• Author of Mastering phpMyAdmin for
Effective MySQL Management

4
Today’s demo

• Small airline system


• Master table: flights
• Reference tables: planes, pilots,
airports, status
• PDF schema generated by PMA

5
6
What is phpMyAdmin?

• Web-based MySQL Front-end


• Tries to keep up with MySQL evolution
• Cross-browser compatibility
• Available in 48 languages
• Official site: www.phpmyadmin.net

7
Why web-based?

• If applications are on a hosted server,


usually no direct access to MySQL
• Typical PMA users
– DB admin and/or web developers
– consultant (on-site, off-site)
– MySQL teaching

8
phpMyAdmin’s popularity
• Lycos’ 1-Click! site hosting plan (7 countries
in Europe, 3 million customers)
• Cpanel (popular web control panel)
• Included in most Apache/MySQL/PHP kits
(Linux, Windows, Mac, Novell Netware 6.5)
• Award: Best PHP application/tool by the
readers of PHP Magazine (2003, 2005)
• 3 to 10 downloads/minute

9
Authentication

• Single-user: hard-coded in config file


• Multi-user: HTTP- or cookie-based
• Multi-server setup
• Interface varies according to the logged-
in user’s privileges

10
11
Home page

• MySQL links (change password,create


db, show processes, full db export)
• PMA links (language, theme, charset)

12
13
Database View

• Table creation
• Multi-table operations (repair, optimize)
• Full-db search
• Multi-table query-by-example

14
15
16
Table View

• Structure change
• Data browsing, inserting, editing
• Searching
• Operations: change type, copy, rename
• Table export

17
18
19
Data navigation

• Paging
• Sort by column / by index
• Row highlighting
• Horizontal/vertical display

20
21
Special Fields Editing

• ENUM and SET


• DATE: calendar popup

22
Binary contents upload

• Available when editing a row


• Offered for all BLOB fields
• Size limits
– BLOB’s size
– web server’s upload limits

23
Index management

• At table's creation: one or many fields


• On table's structure: quick index buttons
• Index view
– Single-field indexes
– Multi-field indexes
– Index segments (size limit)

24
25
Importing data
• Formats supported
– SQL statements
– CSV file (interface to LOAD DATA INFILE)
• Location of data: local workstation or a
web-server directory
• On-the-fly decompression

26
Exporting data

• Formats: SQL, CSV, LaTeX, XML


• Native MS-Excel 97, MS-Excel 2000,
MS-Word 2000
• Split-file export
• Exporting partial results
• Saving on web server

27
Advanced features

• Relational system
• Multi-table query generator
• Query bookmarks
• System documentation
• MIME-based cell transformation

28
Linked-tables infrastructure

• Set of special tables containing meta-


data
• Prerequisite for almost every advanced
features
• Can be centrally installed from a script

29
Relation view

• Uses InnoDB foreign-key constraints


• Also available on non-InnoDB tables
• Gives access to foreign key information
at various places of the interface

30
31
32
Multi-table QBE

• For example, we want to know which


pilots are affected by delayed flights
• Choice of tables, criteria, column
display
• Automatic joins if relations are defined

33
34
Bookmarks

• Recorded on-demand
• Labeled
• Can be viewed, executed, erased
• Private/public
• Automatic execution ( = table name)

35
36
Query history

• Queries typed in the query box are kept


in the linked-tables infrastructure
• By default, last 25 queries
• Can be edited or executed
• Available from the Query Window

37
PDF schema editing

• Page planning
• Available in db view / Operations
• Creation, automatic layout
• Visual editor
• Options (colors, grid, paper size, dict.)

38
39
40
41
MIME-based transformations

• Each cell is transformed at browse time


• Meta-data about
– MIME-type
– Type of transformation
– Transformation options (ie image size)

42
Some transformations

• Clickable thumbnail (.png, .jpeg)


• Image/text link
• Date formatting
• Subtext
• External application

43
44
Server View

• Database statistics
• Server status / query statistics
• User account management
• Process management

45
46
47
Account management

• Global privileges / resource limits


• Database-specific privileges
• Table-/ column-specific privileges
• Change password
• Copy user

48

S-ar putea să vă placă și