ARCHIVED: phpMyAdmin setup guide
On this page:
- Overview
- Upgrade a previous installation
- Install phpMyAdmin
- Access phpMyAdmin
- Additional phpMyAdmin documentation
- Install other versions of phpMyAdmin
Overview
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 ARCHIVED: phpMyAdmin upgrade process.
Install phpMyAdmin
wwws
directory. If your account does not have a wwws
directory, you will need to create one; see ARCHIVED: Deliver pages via a secure web server at IU To install the phpMyAdmin program into your account on Webserve:
- Log into your Webserve account using an SSH command line client such as PuTTY; see ARCHIVED: Use PuTTY to connect to Webserve
- Move into your
wwws
directory by typing:webserve:account> cd wwws
- Install phpMyAdmin by typing the following:
webserve:account> install_phpmyadmin
An
.htaccess
file similar to the following is automatically created in thephpmyadmin
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 IDaccount
, whereaccount
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>
- Before running phpMyAdmin, edit the
config.inc.php
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
config.inc.php
file that you need to edit in order to establish a database connection. Replaceport number
,username
, andpassword
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.iu.edu'; // 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
config.inc.php
file has three blocks: one for connecting to the MySQL production server (mysql.iu.edu
), one for connecting to the test MySQL server (mysql-test.iu.edu
), 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-test.iu.edu';//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
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 config.inc.php
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):
https://www.iu.edu/~account/phpmyadmin https://www.indiana.edu/~account/phpmyadmin https://www.iupui.edu/~account/phpmyadmin https://www.iun.edu/~account/phpmyadmin https://www.iuk.edu/~account/phpmyadmin https://www.iue.edu/~account/phpmyadmin
Additional phpMyAdmin documentation
The opening page of the phpMyAdmin program contains web links to various sources of documentation. There is also documentation available from phpMyAdmin.net.
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 for Pages.
This is document bfop in the Knowledge Base.
Last modified on 2021-09-08 10:22:14.