Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Mastering phpMyAdmin 2.11 for Effective MySQL Management
Mastering phpMyAdmin 2.11 for Effective MySQL Management

Mastering phpMyAdmin 2.11 for Effective MySQL Management: Increase your MySQL productivity and control by discovering the real power of phpMyAdmin 2.11

$19.99 $22.99
eBook Mar 2008 340 pages Edition
eBook
$19.99 $22.99
Subscription
Free Trial
Renews at $19.99p/m
$19.99 $22.99
eBook Mar 2008 340 pages Edition
eBook
$19.99 $22.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
$19.99 $22.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Mastering phpMyAdmin 2.11 for Effective MySQL Management

Chapter 2. Installing phpMyAdmin

It's time to install the product and to configure it minimally for first-time use.

Our reason for installing phpMyAdmin could be one of the following:

  • Our host provider did not install a central copy.

  • Our provider installed it, but the version installed is not current.

  • We are working directly on our enterprise's web server.

Some host providers offer an integrated web panel where we can manage accounts, including MySQL accounts, and also a file manager that can be used to upload web content. Depending on this, the mechanism we use to transfer phpMyAdmin to our web space will vary. We will need some specific information before starting the installation:

  • The web server's name or address. Here, we will assume it is www.mydomain.com.

  • Our web server's account information (username, password), which will be used either for FTP or SFTP transfer, SSH login, or web control panel login.

  • The MySQL server's name or address. Often this is localhost, which means it is located...

System Requirements


The up-to-date requirements for a specific phpMyAdmin version are always stated in the accompanying Documentation.html. For phpMyAdmin 2.11, the minimum PHP version required is PHP 4.1.0 with session support. Moreover, the web server must have access to a MySQL server (version 3.23.32 or later)—either locally or on a remote machine. It is strongly recommended that the PHP mcrypt extension be present for improved performance in cookie authentication mode—more on this later in the chapter. In fact, on a 64-bit server, this extension is required.

On the browser side, cookie support must be activated, whatever authentication mode we use.

GoPHP5

phpMyAdmin is part of the GoPHP5 initiative—see http://GoPHP5.org. This means that the new feature releases of phpMyAdmin after 2008-02-05 will require a server running at least PHP 5.2.

This initiative promotes the adoption of PHP 5 among web hosts.

Downloading the Files


There are various files available in the Downloads section of http://www.phpmyadmin.net. There might be more than one version offered here; always download the latest stable version. We only need to download one file, which works regardless of the platform (browser, web server, MySQL, or PHP version). For the 2.11.0 version, there are three groups of files—english, all-languages-utf-8-only, and all-languages. If we only need the English interface, we can download a file containing "english", for example phpMyAdmin-2.11.0-english.zip. On the other hand, if we have the need for at least one other language, a choice containing "all-languages-utf-8-only" would be appropriate. Finally, on servers previous to MySQL 4.1, a file name containing "all-languages" (without the "utf-8-only" mention) that contains all character sets for all languages would be the best choice.

If we are using a server supporting only PHP3, the latest stable version of phpMyAdmin is not a good choice...

Installation


The next step depends on the platform you are using; the coming sections detail the procedure for some common platforms. You should proceed directly to the relevant section.

Installation on a Remote Server Using a Windows Client

Using the File explorer, we double-click the phpMyAdmin-2.11.0-all-languages-utf-8-only.zip file we just downloaded on the Windows machine; a file extractor should start, showing us all the scripts and directories inside a main phpMyAdmin-2.11.0-all-languages-utf-8-only directory, as shown in the following screenshot, using the 7-Zip File Manager:

Use whatever mechanism your file extractor offers to save all the files, including subdirectories, to some location on your workstation. Here, we have chosen c:\, so a c:\phpMyAdmin-2.11.0-all-languages-utf-8-only directory has been created for extraction.

Now it's time to transfer the whole directory structure c:\phpMyAdmin-2.11.0-all-languages-utf-8-only to the web server in our web space. We use our favorite...

First Connection Configuration


Here we learn how to prepare and use the configuration file which contains the parameters to connect to MySQL, and which can be customized as per our requirements. In this chapter, we will concentrate on the parameters that deal with connection and authentication. Other parameters will be discussed in the chapters where the corresponding features are explained.

Note

Before configuring, we can rename the directory phpMyAdmin-2.11.0-all-languages-utf-8-only to something easier to remember, like phpMyAdmin, phpmyadmin, admin, or whatever. This way, we or our users will be able to visit an easily remembered URL to start phpMyAdmin. We can also use a symbolic link if our server supports this feature.

Configuration Principles

In versions before 2.8.0, a generic config.inc.php file was included in the downloaded kit. Since 2.8.0, this file is no longer present in the directory structure. Note that phpMyAdmin looks for this file in the first level directory—the same...

Multi-Server Configuration


The config.inc.php file contains at least one server-specific section but we can add more, enabling a single copy of phpMyAdmin to manage many servers. Let us see how to configure more servers.

Servers Defined in the Configuration File

In the server-specific sections of the config.inc.php file, we see lines referring to $cfg['Servers'][$i] for each server. Here, the variable $i is used so that one can easily cut and paste whole sections of the configuration file to configure more servers. While copying such sections, we should take care that the $i++; instruction that precedes each section and is crucial to delimit the server sections is also copied.

Then, at the end of the sections, the following line controls what happens at startup:

$cfg['ServerDefault'] = 1;

The default value, 1, means that phpMyAdmin will connect by itself to the first server defined or present this server choice by default when using advanced authentication—more on this later in this chapter...

Advanced Authentication


We might want to allow a single copy of phpMyAdmin to be used by a group of persons, each having their own MySQL username and password and seeing only the databases they have rights to. Or we might prefer to avoid having our username and password in clear text in config.inc.php.

Authentication Types Offered

Instead of relying on a username/password pair stored in config.inc.php, phpMyAdmin will communicate with the browser and get authentication data from it. This enables true login for all users defined in a specific MySQL server, without having to define them in the configuration file. There are three modes offered that allow a controlled login to MySQL via phpMyAdmin: http , cookie and signon. We will have to choose the one that suits our specific situation and environment (more on this in a moment). The http and cookie modes may require that we first define a control user.

The Control User

Note

Defining the control user for authentication purposes only applies...

Security


Security can be examined at various levels:

  • Directory-level protection for phpMyAdmin

  • IP-based access control

  • The databases that a legitimate user can see

  • In-transit data protection

Directory-Level Protection

Suppose an unauthorized person is trying to execute our copy of phpMyAdmin. If we used the simple config authentication type, anyone knowing the URL of our phpMyAdmin will have the same effective rights on our data as us. In this case, we should use the directory-protection mechanism offered by our web server (for example, .htaccess, a file with a leading dot) to add a level of protection.

If we chose to use http or cookie authentication types, our data would be safe enough, but we should take the normal precautions with our password (including its periodic change).

The directory where phpMyAdmin is installed contains sensitive data. Not only the configuration file but also ultimately all scripts stored there must be protected from alteration. We should ensure that apart from us...

Upgrading phpMyAdmin


Normally, upgrading is just a matter of installing the newer version into a separate directory and copying the previous version's config.inc.php to the new directory. If the previous version is phpMyAdmin 2.6.0 or older, we cannot copy its config.inc.php to the new version because the file format has changed too much.

Note

An upgrade—or first-installation—path that should not be taken is to copy libraries/config.default.php to config.inc.php, since this default configuration file is version-specific and is not guaranteed to work for future versions.

New parameters appear from version to version. They are documented in Documentation.html and defined in libraries/config.default.php. If a configuration parameter is not present in config.inc.php, its value from libraries/config.default.php will be used; so we do not have to include it into config.inc.php if the default value suits us.

Special care must be taken to propagate the changes we might have made to the layout.inc...

Summary


In this chapter, we took a look at the common reasons for installing phpMyAdmin, the steps for downloading it from the main site, basic configuration, and uploading it to our web server. We learned how to use a single copy of phpMyAdmin to manage multiple servers, and also the usage of authentication types to fulfill the needs of a users' group while protecting authentication credentials. Securing our phpMyAdmin installation and upgrading phpMyAdmin were also covered.

Left arrow icon Right arrow icon

What you will learn

  • 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.

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Mar 18, 2008
Length: 340 pages
Edition :
Language : English
ISBN-13 : 9781847194190
Category :
Languages :
Concepts :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Mar 18, 2008
Length: 340 pages
Edition :
Language : English
ISBN-13 : 9781847194190
Category :
Languages :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 158.97
Hands-On Data Analysis with Pandas
$64.99
Learning Neo4j
$54.99
Mastering phpMyAdmin 2.11 for Effective MySQL Management
$38.99
Total $ 158.97 Stars icon

Table of Contents

20 Chapters
Introducing phpMyAdmin Chevron down icon Chevron up icon
Installing phpMyAdmin Chevron down icon Chevron up icon
Interface Overview Chevron down icon Chevron up icon
First Steps Chevron down icon Chevron up icon
Changing Data Chevron down icon Chevron up icon
Changing Table Structures Chevron down icon Chevron up icon
Exporting Structure and Data Chevron down icon Chevron up icon
Importing Structure and Data Chevron down icon Chevron up icon
Searching Data Chevron down icon Chevron up icon
Table and Database Operations Chevron down icon Chevron up icon
The Relational System Chevron down icon Chevron up icon
Entering SQL Commands Chevron down icon Chevron up icon
The Multi-Table Query Generator Chevron down icon Chevron up icon
Bookmarks Chevron down icon Chevron up icon
System Documentation Chevron down icon Chevron up icon
MIME-Based Transformations Chevron down icon Chevron up icon
Character Sets and Collations Chevron down icon Chevron up icon
MySQL 5.0 Features Chevron down icon Chevron up icon
MySQL Server Administration Chevron down icon Chevron up icon
Troubleshooting and Support Chevron down icon Chevron up icon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.