Table of Contents for
Mastering phpMyAdmin 3.4 for Effective MySQL Management

Version ebook / Retour

Cover image for bash Cookbook, 2nd Edition Mastering phpMyAdmin 3.4 for Effective MySQL Management by Marc Delisle Published by Packt Publishing, 2012
  1. Cover
  2. Mastering phpMyAdmin 3.4 for Effective MySQL Management
  3. Mastering phpMyAdmin 3.4 for Effective MySQL Management
  4. Credits
  5. About the Author
  6. About the Reviewers
  7. www.PacktPub.com
  8. Preface
  9. What you need for this book
  10. Who this book is for
  11. Conventions
  12. Reader feedback
  13. Customer support
  14. 1. Getting Started with phpMyAdmin
  15. What is phpMyAdmin?
  16. Installing phpMyAdmin
  17. Configuring phpMyAdmin
  18. Installing phpMyAdmin configuration storage
  19. Upgrading phpMyAdmin
  20. Summary
  21. 2. Configuring Authentication and Security
  22. Securing phpMyAdmin
  23. Summary
  24. 3. Over Viewing the Interface
  25. Customizing general settings
  26. Character sets and collations
  27. Navigation panel
  28. Main panel
  29. User preferences
  30. Query window
  31. Summary
  32. 4. Creating and Browsing Tables
  33. Creating our first table
  34. Inserting data manually
  35. Browse mode
  36. Profiling queries
  37. Creating an additional table
  38. Summary
  39. 5. Changing Data and Structure
  40. Changing table structure
  41. Summary
  42. 6. Exporting Structure and Data (Backup)
  43. Exporting a database
  44. Exporting a table
  45. Exporting selectively
  46. Exporting multiple databases
  47. Saving the export file on the server
  48. Memory limits
  49. Summary
  50. 7. Importing Structure and Data
  51. Importing SQL files
  52. Importing CSV files
  53. Importing other formats
  54. Reading files from a web server upload directory
  55. Displaying an upload progress bar
  56. Summary
  57. 8. Searching Data
  58. Performing a complete database search
  59. Stopping an errant query
  60. Summary
  61. 9. Performing Table and Database Operations
  62. Changing table attributes
  63. Emptying or deleting a table
  64. Renaming, moving, and copying tables
  65. Performing other table operations
  66. Multi-table operations
  67. Database operations
  68. Summary
  69. 10. Benefiting from the Relational System
  70. Defining relations with the relation view
  71. Defining relations with the Designer
  72. Benefiting from the defined relations
  73. Column commenting
  74. Summary
  75. 11. Entering SQL Statements
  76. The Query window
  77. Multi-statement queries
  78. Pretty printing (syntax highlighting)
  79. The SQL Validator
  80. Summary
  81. 12. Generating Multi-table Queries
  82. Exploring column criteria
  83. Generating automatic joins (internal relations)
  84. Executing the query
  85. The visual builder
  86. Summary
  87. 13. Synchronizing Data and Supporting Replication
  88. Supporting MySQL replication
  89. Summary
  90. 14. Using Query Bookmarks
  91. Creating bookmarks
  92. Recalling bookmarks from the bookmarks list
  93. Passing a parameter to a bookmark
  94. Summary
  95. 15. Documenting the System
  96. Generating relational schemas
  97. Summary
  98. 16. Transforming Data using MIME
  99. Enabling transformations
  100. Examples of transformations
  101. Summary
  102. 17. Supporting Features Added in MySQL 5
  103. Supporting routines—stored procedures and functions
  104. Executing code with triggers
  105. Using information_schema
  106. Partitioning
  107. Exploring the event scheduler
  108. Summary
  109. 18. Tracking Changes
  110. Prerequisites
  111. Principles
  112. Initiating tracking for one table
  113. Testing the tracking mechanism
  114. Determining tracking status
  115. Structure snapshot
  116. Exporting a version
  117. Creating a new version
  118. Deleting tracking information
  119. Summary
  120. 19. Administrating the MySQL Server
  121. Database information
  122. Server information
  123. Summary
  124. A. Troubleshooting and Support
  125. Seeking support
  126. Contributing to the project

Main panel

The main panel is the principal working area, and all the possible views for it are explained in the following sections. Its appearance can be customized. The background color is defined in $cfg['MainBackground'].

Home page

The home page may contain a varying number of links depending on the login mode and the user's rights. The Home link from the navigation panel is used to display this page. It shows the phpMyAdmin and MySQL versions, the MySQL server name, and the logged-in user. In order to reveal less information about our web server and MySQL server, we could set $cfg['ShowServerInfo'] to FALSE. Another setting, $cfg['ShowPhpInfo'], can be set to TRUE if we want to see the Show PHP Information link on the home page—by default its value is FALSE. In some cases, a No privileges message may appear here; the reason for this and how to fix this condition is covered in Chapter 4.

In this example, a normal user is allowed to change his/her password from the interface by using the Change password link which brings the following dialog:

Home page

We can either choose our new password by typing it twice, or use the Generate button (only available in JavaScript-enabled browsers); in this case, the new password is shown in a clear field for us to take good note of it, and is automatically filled into the dialog for changing the password. It is highly recommended to generate passwords in this way, as they are most likely more secure than a human-chosen password. To disallow the Change password link from the home page, we set $cfg['ShowChgPassword'] to FALSE. Privileged users have more options on the home page. They have more links to manage the server as a whole, for example, the Privileges link (more on this in Chapter 19).

Database view

phpMyAdmin goes into Database view (shown in the following screenshot) every time we click on a database name from the navigation panel.

This is where we can see an overview of the database—the existing tables, a dialog to create a table, the tabs to the Database view pages, and some special operations we might do on this database to generate documentation and statistics. There is a checkbox beside each table to make global operations on that table (covered in Chapter 9). The table is chosen by using the checkbox or by clicking anywhere on the row's background. We can also see each table's size, provided $cfg['ShowStats'] is set to TRUE. This parameter also controls the display of table-specific statistics in the Table view.

The initial screen that appears here is the database Structure page. We note here that almost every column header—such as Table, Records, and Size —is a link which can be used to sort the corresponding column (Chapter Chapter 4 covers sorting). While sorting by descending table name might not be that useful, sorting by descending size is definitely something we should do from time to time.

Database view

We might want a different initial page to appear while entering the Database view. This is controlled by the $cfg['DefaultTabDatabase'] parameter, and the available choices are given in the configuration file as comments.

The number of rows is obtained using a quick method, the SHOW TABLE STATUS statement, and not by using a SELECT COUNT(*) FROM TABLENAME. This quick method is usually accurate, except for InnoDB tables, which returns an approximate number of records. To help get the correct number of records, even for InnoDB, the $cfg['MaxExactCount'] parameter is available. If the approximate number of records is lower than this parameter's value—by default, 20000—the slower SELECT COUNT(*) method will be used.

Do not put a value too high for the MaxExactCount parameter. You would get correct results but only after waiting for a few minutes, if there are many thousands of rows in your InnoDB table. To examine the number of rows as displayed for InnoDB, please refer to Chapter 10, where we actually have an InnoDB table to play with.

A user might be surprised when seeing the term KiB in the Size and Overhead columns. phpMyAdmin has adopted the International Electrotechnical Commission (IEC) binary prefixes (see http://en.wikipedia.org/wiki/Binary_prefix). The displayed values are defined in each language file.

Table view

This is a commonly used view, giving access to all table-specific pages. By default, the initial screen is the table's Browse screen, which shows the first page of this table's data. Note that the header for this screen always shows the current database and table names. We also see the comments set for the table, next to the table name:

Table view

The $cfg['DefaultTabTable'] parameter defines the initial page on the Table view. Some users prefer to avoid seeing the first page's data because in production they routinely run saved queries or enter the Search page (explained in Chapter 8).

Server view

This view is entered each time we go back to the home page. A privileged user will, of course, see more choices in the Server view. The Server view panel was created to group together related server management pages, and enable easy navigation between them.

Server view

The default Server page is controlled by the $cfg['DefaultTabServer'] parameter. This parameter defines the initial starting page as well. For multi-user installations, it is recommended to keep the default value (main.php) , which displays the traditional home page. We could choose to display server statistics instead by changing this parameter to server_status.php, or to see the user's list with server_privileges.php. Other possible choices are explained in the configuration file, and the server administration pages are covered in Chapter 19.

Icons for home page and menu tabs

A configuration parameter, $cfg['MainPageIconic'], controls the appearance of icons at various places of the main panel:

  • On the home page
  • At top of page when listing the Server, Database, and Table information
  • On the menu tabs in Database, Table, and Server views

When the parameter is set to TRUE, which is by default, you will see the following screenshot:

Icons for home page and menu tabs

Opening a new phpMyAdmin window

Sometimes we want to compare data from two tables at once or have other needs for more than one phpMyAdmin window. At the bottom of almost every page, a small icon is available to open another window in phpMyAdmin with the current panel's content. Moreover, this icon can be used to create a browser bookmark that points to the current phpMyAdmin page (but we should log in to access the data).

Opening a new phpMyAdmin window