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

Book Description

In Detail PhpMyAdmin is a well known and popular open-source tool written in PHP intended to handle the administration of MySQL over the Internet. Currently it can create and drop databases, create/drop/alter tables, delete/edit/add fields, execute any SQL statement, and manage keys on fields. While most MySQL developers use routine features of phpMyAdmin every day, few are aware of the power and potential of its advanced features. This book builds a solid understanding of the core capabilities of phpMyAdmin before walking you through every facet of this legendary tool. MySQL is the most popular open-source database, used by millions of developers and supporting numerous large dynamic websites and applications. MySQL acquired this wide popularity by virtue of its open-source nature, performance, reliability, robustness, and support for various platforms. This popularity has also been helped by the existence of phpMyAdmin, the industry-standard administration tool that makes database management easy for both the experienced developer and the novice. The powerful graphical interface that it provides to MySQL has made phpMyAdmin an indispensable tool for MySQL and web developers. Every phpMyAdmin user can benefit from unlocking the full potential of this powerful application. 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 databases. What you will learn from this book?

  • Common reasons for installing PhpMyAdmin

  • Managing multiple servers on single copy of PhpMyAdmin

  • Securing your PhpMyAdmin installation

  • Upgrading your PhpMyAdmin installation

  • Managing databases, data table structures, and indexes to create efficient databases

  • Administering MySQL users and privileges

  • Getting server and database statistics

  • Generating better documentation of evolving table structures


Along the way you will build a more detailed understanding of SQL and how it works in MySQL. Approach This book is a tutorial that systematically explains and demonstrates the potential of this tool. It then goes on to show the less well known and generally under-used features and capabilities of phpMyAdmin in depth. Who this book is written for? Whether you are an experienced developer, system administrator, web designer or new to MySQL, phpMyAdmin is a must-have tool for anyone who needs to manage MySQL databases and tables. This book is a must-read for every serious phpMyAdmin user who would like to use this outstanding application to its full power.

Table of Contents

  1. Mastering phpMyAdmin 2.11 for Effective MySQL Management
    1. Table of Contents
    2. Mastering phpMyAdmin 2.11 for Effective MySQL Management
    3. Credits
    4. About the Author
    5. About the Reviewers
    6. Preface
      1. What This Book Covers
      2. What You Need for This Book
      3. Conventions
      4. Reader Feedback
      5. Customer Support
        1. Downloading the Example Code for the Book
        2. Errata
        3. Questions
    7. 1. Introducing phpMyAdmin
      1. PHP and MySQL: The Leading Open-Source Duo
      2. What is phpMyAdmin?
      3. History
      4. Awards
      5. phpMyAdmin Features Summary
      6. Summary
    8. 2. Installing phpMyAdmin
      1. System Requirements
        1. GoPHP5
      2. Downloading the Files
      3. Installation
        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)
      4. First Connection Configuration
        1. Configuration Principles
        2. Web-Based Setup Script
        3. Manual Creation of config.inc.php
        4. Tips for Editing config.inc.php on a Windows Client
        5. The config.inc.php File
        6. PmaAbsoluteUri
        7. Server-Specific Sections
          1. extension
          2. PersistentConnections
          3. connect_type, socket and port
          4. compress Configuration
          5. Authentication Type: config
        8. Testing the First Connection
      5. Multi-Server Configuration
        1. Servers Defined in the Configuration File
        2. Arbitrary Server
      6. Advanced Authentication
        1. Authentication Types Offered
        2. The Control User
        3. Logging Out
        4. HTTP Authentication
        5. Cookie Authentication
        6. Signon
      7. Security
        1. Directory-Level Protection
        2. IP-Based Access Control
          1. Rules
          2. Order of Interpretation for Rules
          3. Simplified Rule for Root Access
        3. Restricting the List of Databases
        4. Protecting In-Transit Data
      8. Upgrading phpMyAdmin
      9. Summary
    9. 3. Interface Overview
      1. Panels and Windows
        1. Login Panels
        2. Left and Right Panels
          1. Home Page
          2. Views
        3. Query Window
        4. Starting Page
        5. Window Titles Configuration
        6. General Icon Configuration
        7. Natural Sort Order for Database and Table Names
      2. Language Selection
      3. Themes
        1. Theme Configuration
        2. Theme Selection
      4. Left Panel
        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. Quick-Browsing a Table
          5. Nested Display of Tables within a Database
        3. Server-List Choice
        4. Handling Many Databases or Tables
      5. Right Panel
        1. Home Page
        2. Database View
        3. Table View
        4. Server View
        5. Icons for Home Page and Menu Tabs
      6. Query Window
      7. Site-Specific Header and Footer
      8. MySQL Documentation Links
      9. 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
        5. Color-Marking Rows
        6. Limiting the Length of Each Column
        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 Contents Uploads
      5. ENUM and SET
      6. DATE, DATETIME, and TIMESTAMP
        1. Calendar Popup
        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
      1. Dumps, Backups, and Exports
      2. Database Exports
        1. The Export Sub-Panel
        2. SQL
          1. SQL Options
        3. The Save as file Sub-Panel
          1. File Name Template
          2. Compression
          3. Choice of Character Set
        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
      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. Single-Table Searches
        1. Daily Usage of phpMyAdmin
        2. Entering the Search Sub-Page
        3. Selection of Display Fields
        4. Ordering the Results
        5. Search Criteria by Field: Query by Example
        6. Print View
        7. Wildcard Searching
        8. Combining Criteria
        9. Applying a WHERE Clause
        10. Obtaining Distinct Results
      2. Complete Database Search
      3. Summary
    16. 10. Table and Database Operations
      1. Table Maintenance
      2. Changing Table Attributes
        1. Table Type
        2. Table Comments
        3. Table Order
        4. 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
      2. Linked-Tables Infrastructure
        1. Goal of the Infrastructure
        2. Location of the Infrastructure
        3. Installing Linked-Tables Infrastructure
          1. Multi-User Installation
          2. Single-User Installation
      3. Defining Relations with the Relation View
        1. Internal Relations
          1. Defining the Relation
          2. Defining the Display Field
        2. InnoDB Relations
          1. InnoDB Tables without Linked-Tables Infrastructure
      4. Defining Relations with the Designer
        1. Interface Overview
        2. Defining Relations
          1. InnoDB 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. Creating a Bookmark after a Successful Query
      2. Storing a Bookmark before Sending a Query
      3. Multi-Query Bookmarks
      4. Recalling from the Bookmarks List
        1. Bookmark Execution
        2. Bookmark Manipulation
      5. Public Bookmarks
      6. The Default Initial Query for a Table
      7. Bookmark Parameters
        1. Creating a Parameterized Bookmark
        2. Passing a Parameter Value to a Bookmark
      8. Executing Bookmarks by Browsing the pma_bookmark Table
      9. Summary
    21. 15. System Documentation
      1. The Database Print View
      2. The Selective Database Print View
      3. The Table Print View
      4. The Data Dictionary
      5. 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
      6. Summary
    22. 16. MIME-Based 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. External Applications
          1. External Application Example: In-Cell Sort
      4. Summary
    23. 17. Character Sets and Collations
      1. Language Files and UTF-8
      2. Versions of MySQL Prior to 4.1.x
        1. Data Recoding
        2. Character Sets
        3. Choosing the Effective Character Set
        4. The Impact of Switching
        5. Importing and Exporting with Character Sets
      3. MySQL 4.1.x and Later
        1. Collations
        2. The Home Page
          1. Creating a Database
          2. Available Character Sets and Collations
          3. Effective Character Sets and Collations
        3. The Database View
        4. The Table View
        5. Importing and Exporting with Character Sets
        6. Server View
      4. Kanji Support
      5. Summary
    24. 18. MySQL 5.0 Features
      1. Observations on the History of MySQL 5.0
      2. Views
        1. Manually Creating a View
        2. Right Panel and Views
        3. Creating a View from Results
        4. Renaming a View
        5. Performance Hint
      3. 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
      4. Triggers
        1. Manually Creating a Trigger
        2. Testing the Trigger
      5. Information_schema
      6. Profiling
      7. Summary
    25. 19. MySQL Server Administration
      1. Entering the Server View
        1. User and Privileges Management
        2. The User Overview
        3. Adding a User
          1. User Name
          2. Host
          3. Password
          4. Database Creation and Rights
          5. Global Privileges
          6. Resource Limits
        4. Editing a User
          1. Edit Privileges
          2. Database-Specific Privileges
          3. Changing the Password
          4. Changing Login Information or Copying a User
        5. Removing a User
      2. Database Information
        1. Enabling Statistics
        2. Sorting Statistics
        3. Checking the Database Privileges
        4. Dropping Selected Databases
      3. Server Operations
        1. Server Status Verification
          1. The General Status Page
          2. InnoDB Status
        2. Server Variables
        3. Server Processes
        4. Storage Engines
        5. The Binary Log
      4. Summary
    26. 20. Troubleshooting and Support
      1. System Requirements
      2. Base Configuration
      3. Solving Common Errors
        1. Error Messages
          1. Cannot Load MySQL Extension
          2. MySQL Said: Can't Connect to Local MySQL Server
          3. Socket Problem (Linux/UNIX)
          4. Named Pipe Problem (Windows)
          5. Error # 2003: The Server is not Responding
          6. MySQL Said: Access Denied
          7. When Using http Authentication
          8. When Using http, cookie, or config Authentication
          9. Access Denied ... "using password: NO"
          10. Access Denied ... "using password: YES"
          11. Warning: Cannot Add Header Information
          12. MySQL Said: Error 127, Table Must Be Repaired
          13. BLOB Column Used in Key Specification without a Key Length
          14. IIS: No Input File Specified
          15. 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
        1. FAQs
        2. Help Forums
          1. Creating a SourceForge Account
          2. Choosing the Thread Title
          3. Reading the Answers
        3. Support Tracker
        4. Bug Tracker
          1. Environment Description
          2. Bug Description
      5. Contributing to the Project
        1. The Code Base
        2. Translation Updates
        3. Patches
      6. Future phpMyAdmin Versions
      7. Summary
    27. Index