You are previewing Mastering phpMyAdmin 3.1 for Effective MySQL Management.
O'Reilly logo
Mastering phpMyAdmin 3.1 for Effective MySQL Management

Book Description

Increase your MySQL productivity and control by discovering the real power of phpMyAdmin 3.1

  • Covers version 3.1, the latest version of phpMyAdmin

  • Administer your MySQL databases with phpMyAdmin

  • Manage users and privileges with MySQL Server Administration tools

  • Get to grips with the hidden features and capabilities of phpMyAdmin

In Detail

MySQL has gained wide popularity because of its open-source nature, performance, reliability, robustness, and support for various platforms.

phpMyAdmin is a web-based front-end to manage MySQL databases and has been adopted by a number of open-source distributors. It is one of the most widely used open-source applications written in PHP. phpMyAdmin supports a wide range of operations with MySQL. Currently, it can create and drop databases, create/drop/alter tables, delete/edit/add fields, execute any SQL statement, manage keys on fields, manage privileges, export data into various formats and is available in 52 languages. The powerful graphical interface of version 3.1 has made phpMyAdmin an indispensable tool for MySQL and web developers.

This is the first book that covers version 3.1, the latest version of phpMyAdmin. It has been fully updated from the previous version that covered phpMyAdmin Version 2.11. It is a comprehensive guide to unlocking the full potential of phpMyAdmin. It builds a solid understanding of the core capabilities of phpMyAdmin before walking you through every facet right from showing you how to set up and manage the database with clear, step-by-step instructions and screenshots to exploring the less well known and generally under-used features and capabilities of phpMyAdmin in depth. Along the way you'll build a more detailed understanding of SQL and how it works in MySQL.

Whether you are an experienced developer, system administrator, web designer or new to MySQL and phpMyAdmin, this book will show you how to increase your productivity and control when working with your MySQL.

Table of Contents

  1. Mastering phpMyAdmin 3.1 for Effective MySQL Management
    1. Table of Contents
    2. Mastering phpMyAdmin 3.1 for Effective MySQL Management
    3. Credits
    4. About the author
    5. About the reviewer
    6. Preface
      1. What this book covers
      2. What you need for this book
      3. Who is this book for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Errata
        2. Piracy
        3. Questions
    7. 1. Introduction and Installation
      1. Introducing phpMyAdmin
        1. Web applications
        2. PHP and MySQL:The leading open source duo
        3. What is phpMyAdmin?
        4. phpMyAdmin features
      2. Installing phpMyAdmin
        1. Required information
        2. System requirements
        3. Downloading the files
        4. Installation procedure
          1. Installation on a remote server using a Windows client
          2. Installation on a local Linux server
          3. Installation on local Windows servers (Apache, IIS)
      3. Configuring phpMyAdmin
        1. The config.inc.php file
          1. Permissions on config.inc.php
        2. Configuration principles
        3. Web-based setup script
        4. Manual creation of config.inc.php
        5. Tips for editing config.inc.php on a Windows Client
        6. Description of some configuration parameters
          1. PmaAbsoluteUri
          2. Server-specific sections
            1. extension
            2. PersistentConnections
            3. connect_type, socket and port
            4. compress configuration
      4. Upgrading phpMyAdmin
      5. Summary
    8. 2. Authentication and Security
      1. MySQL authentication
        1. Root user without password
        2. Single-user authentication using config
          1. Testing the connection
        3. Multi-user authentication
          1. Authentication types offered
          2. The control user
          3. Logging out
          4. HTTP authentication
          5. Cookie authentication
          6. Signon authentication
        4. Multi-server configuration
          1. Servers defined in the configuration file
          2. Arbitrary server
      2. Security
        1. Directory-level protection
        2. Error handling
        3. IP-based access control
          1. Rules
          2. Order of interpretation for rules
          3. Simplified rule for root access
        4. Restricting the list of databases
        5. Protecting in-transit data
        6. Swekey hardware authentication
          1. Configuration
          2. Usage
          3. Security note
      3. Summary
    9. 3. Interface Overview
      1. Panels and windows
        1. Login panels
        2. Left and right panels
          1. Homepage
          2. Views
        3. Query window
        4. Starting page
      2. General customization
        1. Window titles configuration
        2. Icon configuration
        3. Natural sort order for database and table names
        4. Site-specific header and footer
        5. MySQL documentation links
        6. Themes
          1. Theme configuration
          2. Theme selection
        7. The color picker
        8. Sliders
      3. Character sets, collations and language
        1. Collations
        2. Unicode and UTF-8
        3. Language selection
        4. Effective character sets and collations
      4. Left panel (navigation)
        1. Logo configuration
        2. Database and table list
          1. Light mode
            1. Tree display of database names
          2. Full mode
          3. Table short statistics
          4. Table quick-access icon
          5. Nested display of tables within a database
        3. Server-list choice
        4. Handling many databases or tables
          1. Limits on the interface
          2. Improving fetch speed
      5. Right panel (main)
        1. Homepage
        2. Database view
        3. Table view
        4. Server view
        5. Icons for homepage and menu tabs
      6. Query window
      7. Summary
    10. 4. First Steps
      1. Database creation
        1. No privileges?
        2. First database creation is authorized
      2. Creating our first table
        1. Choosing the fields
        2. Table creation
        3. Choosing keys
      3. Manual data insertion
        1. Data entry panel tuning for CHAR and VARCHAR
      4. Browse mode
        1. SQL query links
        2. Navigation bar
        3. Query results operations
        4. Sorting results
          1. Headwords
        5. Color-marking rows
        6. Limiting the length of each column
          1. Display options
        7. Browsing distinct values
        8. Browse-mode customization
      5. Creating an additional table
      6. Summary
    11. 5. Changing Data
      1. Edit mode
        1. Moving to next field with the tab key
        2. Moving with arrows
        3. Handling NULL values
        4. Applying a function to a value
        5. Duplicating rows of data
      2. Multi-row editing
      3. Editing the next row
      4. Deleting data
        1. Deleting a single row
        2. Deleting many rows
        3. Deleting all the rows in a table
        4. Deleting all rows in many tables
      5. Deleting tables
      6. Deleting databases
      7. Summary
    12. 6. Changing Table Structures
      1. Adding a field
        1. Vertical mode
        2. Horizontal mode
      2. Editing field attributes
      3. TEXT
      4. BLOB (Binary Large Object) fields
        1. Binary content uploads
      5. ENUM and SET
      6. DATE, DATETIME, and TIMESTAMP
        1. Calendar pop up
        2. TIMESTAMP options
      7. Bit
      8. Index management
        1. Single-field indexes
        2. Multi-field indexes and index editing
        3. FULLTEXT Indexes
        4. Table optimization—explaining a query
        5. Detection of index problems
      9. Summary
    13. 7. Exporting Structure and Data (Backup)
      1. Dumps, backups, and exports
        1. Scope of the export
      2. Database exports
        1. The export subpanel
        2. SQL
          1. SQL options
        3. The "Save as file" subpanel
          1. File name template
          2. Compression
          3. Choice of character set
          4. Kanji support
        4. CSV
        5. CSV for MS Excel
        6. PDF
        7. Microsoft Excel 2000
        8. Microsoft Word 2000
        9. LaTeX
        10. XML
        11. Native MS Excel (pre-Excel 2000)
        12. Open document spreadsheet
        13. Open document text
        14. YAML
        15. CodeGen
        16. Texy! text
      3. Table exports
        1. Split-file exports
      4. Selective exports
        1. Exporting partial query results
        2. Exporting and checkboxes
      5. Multi-database exports
      6. Saving the export file on the server
        1. User-specific save directories
      7. Memory limits
      8. Summary
    14. 8. Importing Structure and Data
      1. Limits for the transfer
        1. Time limits
        2. Other limits
        3. Partial imports
        4. Temporary directory
      2. Importing SQL files
      3. Importing CSV files
        1. Differences between SQL and CSV formats
        2. Exporting a test file
        3. CSV
        4. CSV using LOAD DATA
          1. Requirements
          2. Using the LOAD DATA interface
      4. Web server upload directories
      5. Summary
    15. 9. Searching Data
      1. Daily usage of phpMyAdmin
      2. Single-table searches
        1. Entering the search subpage
        2. Search criteria by field—query by example
          1. Searching for empty / non-empty values
        3. Print view
        4. Wildcard search
        5. Case sensitivity
        6. Combining criteria
        7. Search options
          1. Selecting the fields to be displayed
          2. Ordering the results
          3. Applying a WHERE clause
          4. Obtaining distinct results
      3. Complete database search
        1. Restricting search to a column
      4. Summary
    16. 10. Table and Database Operations
      1. Table maintenance
      2. Changing table attributes
        1. Table storage engine
        2. Table comments
        3. Table order
        4. Table collation
          1. Impact of switching connection collation
        5. Table options
      3. Renaming, moving, and copying tables
        1. Appending data to a table
      4. Multi-table operations
        1. Repairing an "in use" table
      5. Database operations
        1. Renaming a database
        2. Copying a database
      6. Summary
    17. 11. The Relational System
      1. Relational MySQL
        1. InnoDB and PBXT
      2. Linked-tables infrastructure
        1. Goal of the infrastructure
        2. Location of the infrastructure
        3. Installing linked-tables infrastructure
          1. Multi-user installation
            1. Infrastructure and config.inc.php
          2. Single-user installation
      3. Defining relations with the relation view
        1. Internal relations
          1. Defining the relation
          2. Defining the display field
        2. Foreign key relations
          1. Foreign keys without linked-tables infrastructure
      4. Defining relations with the Designer
        1. Interface overview
        2. Defining relations
          1. Foreign key relations
        3. Defining the display field
        4. Exporting for PDF schema
      5. Benefits of the defined relations
        1. Foreign key information
        2. The drop-down list of foreign keys
        3. The browseable foreign-table window
        4. Referential integrity checks
        5. Automatic updates of metadata
      6. Column-commenting
        1. Automatic migration
      7. Summary
    18. 12. Entering SQL Commands
      1. The SQL query box
        1. The Database view
        2. The Table view
          1. The Fields selector
          2. Clicking into the query box
      2. The Query window
        1. Query window options
        2. Session based SQL history
        3. Database based SQL history (permanent)
        4. Editing queries in the query window
      3. Multi-statement queries
      4. Pretty printing (syntax-highlighting)
      5. The SQL Validator
        1. System requirements
        2. Making the Validator available
        3. Validator results
          1. Standard-conforming queries
          2. Non-standard-conforming queries
      6. Summary
    19. 13. The Multi-Table Query Generator
      1. Choosing tables
      2. Column criteria
        1. Field selector: Single-column or all columns
        2. Sorts
        3. Showing a column
        4. Updating the query
        5. Criteria
          1. Adjusting the number of criteria rows
          2. Adjusting the number of criteria columns
      3. Automatic joins
      4. Executing the query
      5. Summary
    20. 14. Bookmarks
      1. Comparing bookmark and query history features
      2. Bookmark creation
        1. Creating a bookmark after a successful query
        2. Storing a bookmark before sending a query
        3. Public bookmarks
        4. The default initial query for a table
        5. Multi-query bookmarks
      3. Recalling from the bookmarks list
        1. Bookmark execution
        2. Bookmark manipulation
      4. Bookmark parameters
        1. Creating a parameterized bookmark
        2. Passing a parameter value to a bookmark
      5. Executing bookmarks by browsing the pma_bookmark table
      6. Summary
    21. 15. System Documentation
      1. Structure reports
        1. Using print view
        2. The database print view
          1. The selective database print view
        3. The table print view
        4. The data dictionary
      2. Relational schema in PDF
        1. Adding a third table to our model
        2. Editing PDF pages
          1. Page planning
          2. Creating a new page
          3. Editing a page
          4. Displaying a page
          5. A note about fonts used
        3. Using the Designer for PDF layout
      3. Summary
    22. 16. MIME-Based Transformations
      1. Display behavior in browse mode
        1. Display options
      2. Enabling transformations
        1. The MIME column's settings
          1. MIME types
          2. Browser transformations
          3. Transformation options
        2. Requirements for image generation
          1. The GD2 library
          2. The JPEG and PNG libraries
          3. Memory limits
      3. Examples of transformations
        1. Clickable thumbnail (.jpeg or .png)
        2. Links to an image
        3. Date formatting
        4. Links from text
          1. text/plain: link
          2. text/plain: imagelink
        5. Preserving the original formatting
        6. Displaying parts of a text
        7. Download link
        8. Hexadecimal representation
        9. SQL pretty printing
        10. IP address
        11. External applications
          1. External application example: In-cell sort
      4. Summary
    23. 17. MySQL 5.0 and 5.1 Support
      1. Views
        1. Manually creating a view
        2. Right panel and views
        3. Creating a view from results
        4. Renaming a view
        5. Performance hint
      2. Routines—stored procedures and functions
        1. Creating a stored procedure
          1. Changing the delimiter
          2. Entering the procedure
        2. Testing the procedure
        3. Manipulation
        4. Manually creating a function
        5. Testing the function
        6. Exporting stored procedures and functions
      3. Triggers
        1. Manually creating a trigger
        2. Testing the trigger
      4. Information_schema
      5. Profiling
      6. Partitioning
        1. Table creation
        2. Operations
        3. Exporting
      7. Event scheduler
        1. Activating the scheduler
        2. Granting EVENT permission
        3. Creating an event
        4. Event manipulation
        5. Exporting
      8. BLOB streaming
        1. System requirements
        2. Configuration
        3. Implementation limitations in phpMyAdmin
        4. Creating the PBMS system tables
        5. Table preparation
        6. Uploading to BLOB repository
        7. Streaming the data from repository
        8. Changing repository data
      9. Summary
    24. 18. MySQL Server Administration
      1. User and privileges management
        1. The user overview
          1. Privileges reload
        2. Adding a user
          1. User name
          2. Host
          3. Password
          4. Database creation and rights
          5. Global privileges
          6. Resource limits
        3. Editing a user
          1. Edit privileges
          2. Database-specific privileges
          3. Changing the password
          4. Changing login information or copying a user
        4. Removing a user
      2. Database information
        1. Enabling statistics
        2. Sorting statistics
        3. Checking the database privileges
        4. Dropping selected databases
      3. Server information
        1. Server status verification
          1. The general status page
          2. InnoDB status
        2. Server variables
        3. Server processes
        4. Storage engines
        5. Available character sets and collations
        6. The binary log
      4. Summary
    25. A. History of phpMyAdmin
      1. Early events
      2. Project re-launch
        1. Distributors
      3. Evolution
      4. GoPHP5 and the 3.x branch
      5. Awards
      6. Summary
    26. B. Troubleshooting and Support
      1. System requirements
      2. Base configuration
      3. Solving common errors
        1. Error messages
          1. Cannot load MySQL extension
          2. #2003 - Can't connect to MySQL server
          3. Socket problem (Linux/UNIX)
          4. Named pipe problem (Windows)
          5. MySQL said: Access denied
          6. When using http authentication
          7. When using http, cookie, or config authentication
          8. Access denied ... "using password: NO"
          9. Access denied ... "using password: YES"
          10. Warning: cannot add header information
          11. MySQL said: Error 127, Table Must Be Repaired
          12. BLOB column used in key specification without a key length
          13. IIS: No Input File Specified
          14. A "404: page not found" error when modifying a row
        2. Other problems
          1. Blank page or weird characters
          2. Not being able to create a database
          3. Problems importing large files or uploading large BLOB files
          4. MySQL root password lost
          5. Duplicate field names when creating a table
          6. Authentication window displayed more than once
          7. Column size changed by phpMyAdmin
          8. Seeing many databases that are not ours
          9. Not being able to store a value greater than 127
      4. Seeking support
      5. FAQs
      6. Help forums
        1. Creating a SourceForge account
        2. Choosing the thread title
        3. Reading the answers
        4. Support tracker
        5. Bug tracker
        6. Environment description
        7. Bug description
      7. Contributing to the project
        1. The code base
        2. Translation updates
        3. Patches
      8. Future phpMyAdmin versio]ns
      9. Summary
    27. Index