Portal Home > Knowledgebase > Dedicated Servers Support > How to install phpMyAdmin?


How to install phpMyAdmin?




All right, so you want to install phpMyAdmin.

First, go to http://www.phpMyAdmin.net and download phpMyAdmin.

(Note: The following instructions were written for phpMyAdmin version 2.7.0- pl2. If you are installing a different version, there may be some slight changes.)

TIP: Before beginning this installation, make sure you have the following information on hand: name of the MySQL 'host' server, your username for MySQL access, and your MySQL password. You can find the information for the host name and username by visiting the MySQL Account Manager in your CNC (Command'N'Control) panel. If you have forgotten your MySQL password, you will also be able to reset it through your MySQL Account Manager. Note that doing so will change the MySQL password for all of your MySQL databases.

Next, unzip/untar all the files and directories.

If there is not one, you will need to create a file named config.inc.php. That file will need to contain the following lines:


<?php
$i=1;
$cfg['PmaAbsoluteUri'] = 'http://example.com/pma/';
$cfg['Servers'][$i]['host'] = 'MySQL.example.com';
$cfg['Servers'][$i]['auth_type'] = '';
$cfg['Servers'][$i]['user'] = '';
$cfg['Servers'][$i]['password'] = '';
$cfg['blowfish_secret'] = '';
?>

Your settings need to be entered in between the ' ' marks after the equal signs. A description of the settings follows:

$cfg['PmaAbsoluteUri'] = 'http://example.com/pma/'; -- replace example.com with your domain and pma with the location where you will install phpMyAdmin on your account

$cfg['Servers'][$i]['host'] = 'MySQL.example.com'; -- replace example.com with your domain

$cfg['Servers'][$i]['auth_type'] = ''; -- dictates the authentication method used when connecting to your phpMyAdmin installation.

    The three options for authentication are:

        * config (the default method)
        * http
        * cookie (recommended method)

    config method - This method is the least secure, as it requires storing your MySQL username and password in the file on the server. Anyone who would find the directory to your phpMyadmin installation would then be able to access your databases. This is the default method, however. *See important note.

    http or cookie authentication methods - These methods are more secure, as your username and password are not stored on the server in your configuration file.

    The 'http' option uses the Apache http authentication method. The 'cookie' method uses cookies, and has the advantage that you can "Log Out" at the end of your session, deleting the cookie. The development team for phpMyAdmin notes, however, that for certain browsers, these two authentication methods may be a bit buggy.

$cfg['Servers'][$i]['user'] = ''; -- MySQL username if you are using config method - otherwise leave blank

$cfg['Servers'][$i]['password'] = ''; -- MySQL password only if you are using config method - otherwise leave blank

$cfg['blowfish_secret'] = ''; -- used with the cookie method only. If you specified cookie in the auth_type above, type in a random passphrase for this setting. The passphrase is just used internally to encrypt the password - you will not be prompted for it later.

Make sure you don't have any blank lines at the end of the file, and save it as config.inc.php.

Now, create a new directory in your "www" directory titled something like "pma" (same as the directory named above by $cfg['PmaAbsoluteUri']).

Then, upload ALL of the phpMyAdmin files to this directory, including the config.inc.php file.

Finally, open a web browser, and go to http://www.example.com/pma/index.php (replace example.com with your domain name and pma with whatever directory phpMyAdmin is in) and you should see the welcome page and be able to start configuring your databases!

Important Note: If you use the 'config' authentication method, it is strongly recommended that you secure the directory in which phpMyAdmin is installed. For information on how to password protect directories, visit the Password Protection Tutorial. This extra step is not needed when using either the 'http' or 'cookie' authentication methods.

Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read