ARCHIVED: phpMyAdmin setup guide

This content has been archived, and is no longer maintained by Indiana University. Resources linked from this page may no longer be available or reliable.
The Webserve and Webtest servers use PHP 7.1; PHP 5.6 has been retired and is no longer available. For more about PHP at IU, see PHP server-side scripting language.
Due to security concerns, UITS does not recommend phpMyAdmin for management of MySQL for Webserve databases; instead, use MySQL Workbench.

On this page:


phpMyAdmin is an application written in the PHP language that provides a web-based interface for the administration of MySQL databases.

A version of phpMyAdmin has been customized for use on Webserve. Information on how to install it and use it to connect to the MySQL service is documented below.

Upgrade a previous installation

If you previously installed the phpMyAdmin application using the install_phpmyadmin command on Webserve, you may upgrade to the latest version (3.3.3) by following the instructions found in phpMyAdmin upgrade process.

Install phpMyAdmin

Store the application within the wwws directory. If your account does not have a wwws directory, you will need to create one; see Deliver pages via a secure web server at IU

To install the phpMyAdmin program into your account on Webserve:

  1. Log into your Webserve account using an SSH command line client such as PuTTY; see Use PuTTY to connect to Webserve
  2. Move into your wwws directory by typing:
     webserve:account> cd wwws
  3. Install phpMyAdmin by typing the following:
     webserve:account> install_phpmyadmin

    An .htaccess file similar to the following is automatically created in the phpmyadmin directory:

     AuthGroupFile /dev/null AuthType CAS AuthName "IU Network ID" <Limit GET POST> require user account </Limit>

    Do not delete this .htaccess file. Removing it will make your MySQL database vulnerable to exploit.

    This .htaccess file currently restricts access to the IU Network ID account, where account is the name of your Webserve account. You can edit this .htaccess file to add additional users to the line (separate each name with a space):

     <Limit GET POST> require user account username1 username2 </Limit>
  4. Before running phpMyAdmin, edit the file . To move into the directory where this file is located, type: cd phpmyadmin.

    As you edit the file, make sure lines do not wrap as a result of your edits. If you notice the line wraps as you enter information, correct the line so that it does not wrap.

    Below is the section of the file that you need to edit in order to establish a database connection. Replace port number, username, and password with the port number for your account and the username/password that you've granted privileges to when setting up your database.

     $cfg['Servers'][$i]['host'] = ''; // MySQL hostname $cfg['Servers'][$i]['port'] = 'port number'; // MySQL port $cfg['Servers'][$i]['extension'] = 'mysql'; $cfg['Servers'][$i]['connect_type']= 'tcp'; $cfg['Servers'][$i]['compress'] = false; $cfg['Servers'][$i]['auth_type'] = 'config'; $cfg['Servers'][$i]['user'] = 'username'; // MySQL user $cfg['Servers'][$i]['password'] = 'password'; // MySQL password

    By default, the file has three blocks: one for connecting to the MySQL production server (, one for connecting to the test MySQL server (, and a blank one. The test server and blank ones are commented out; if you wish to establish connections beyond the first block, you will need to remove the // comment tags. Below is an example of the block with the comment tags still present:

     //$cfg['Servers'][$i]['host'] = '';//MySQL hostname //$cfg['Servers'][$i]['port'] = ''; // MySQL port //$cfg['Servers'][$i]['extension'] = 'mysql'; //$cfg['Servers'][$i]['connect_type']= 'tcp'; //$cfg['Servers'][$i]['compress'] = FALSE; //$cfg['Servers'][$i]['auth_type'] = 'config'; //$cfg['Servers'][$i]['user'] = ''; // MySQL user //$cfg['Servers'][$i]['password'] = ''; // MySQL password

Access phpMyAdmin

Completing the installation steps above will create a directory named phpMyAdmin-3.3.3-all-languages and a symbolic link named phpmyadmin that points to this directory. This symbolic link will make it possible for you to access the application by specifying phpmyadmin in the URL rather than phpMyAdmin-3.3.3-all-languages. The permissions for phpmyadmin are set to world read/write/execute. This is appropriate since it is a symbolic link. Your phpMyAdmin-3.3.3-all-languages directory, however, has proper permissions set and should not be altered.

Make sure that you have made the necessary edits to the .htaccess and files before trying to access the application. In the example below, the phpMyAdmin directory was created within the wwws directory using the install_phpmyadmin command above.

You may access the phpMyAdmin interface by using any of the following (replace account with the name of your web account):

Additional phpMyAdmin documentation

The opening page of the phpMyAdmin program contains web links to various sources of documentation. There is also documentation available from

Install other versions of phpMyAdmin

If you wish to install a different version of phpMyAdmin than the one that is made centrally available, you may do so by downloading the application into your account. If you choose this option, be sure to do the following:

  • Install the application within the wwws directory.
  • Restrict access to it, such as through the use of an .htaccess file.

For more about restricting access, see Control web page access.

This is document bfop in the Knowledge Base.
Last modified on 2018-08-28 07:24:06.

Contact us

For help or to comment, email the UITS Support Center.