phpMyAdmin Setup Guide
This document may have additional information added to it.Last updated: March 22nd, 2006
Table of Contents
-
Who should read this document?
What is the phpMyAdmin program?
How do I install the phpMyAdmin program into my Webserve account?
How do I configure the phpMyAdmin program so that it will work with the mySQL database service on mysql.iu.edu?
Using a web browser, how do I access the phpMyAdmin program to administer my databases?
What on-line documentation for phpMyAdmin is available?
Who should read this document?
Account holders on the mySQL database service who develop web applications that would like to use a web-based interface to their database server and the databases that it houses.
What is the phpMyAdmin program?
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 by WebTech Services to easily install and function in your Webserve account. This version installs ready for you to enter a few lines of configuration information and then connect to your mySQL server on the mySQL database service host: mysql.iu.edu.
How do I install the phpMyAdmin program into my Webserve account
A command-line utility called 'install_phpmyadmin' has been provided for installing the specially modified phpMyAdmin program into your account.
Follow the steps below to install the phpMyAdmin program:
- Login to your Webserve account.
- You can only install the phpMyAdmin program in web directories
served by the secure web server associated with your Webserve
account. This ensures that passwords that are entered in order to gain
access to the program are not passed over the network in 'clear-text', that is,
unaltered, and possibly visible to an eavesdropper.
Change your working directory to the desired secure server web document directory in or beneath the 'wwws' subdirectory in your account. If your account does not have a 'wwws' directory, refer to the Secure WWW Server document for information on creating this necessary directory.
- Run the 'install_phpmyadmin' utility.
webserve:myaccount> install_phpmyadmin Installing phpmyadmin - please wait... phpmyadmin installation completeAn .htaccess file like below is automatically created in the phpmyadmin directory.AuthUserFile IUauth AuthGroupFile /dev/null AuthType Basic AuthName "IU Network ID" <Limit GET POST> require user myaccount </Limit>You should 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: myaccount. You may need to edit this .htaccess file to add additional users to the line:require user myaccount
You will also need to edit the file/ip/myaccount/wwws/phpmyadmin/config.inc.php4. You must include information about your database in this file before running phpmyadmin. - Proceed to the next section to configure the phpMyAdmin program to access your databases hosted by your mySQL database server on the mysql.iu.edu mySQL database service host.
How do I configure the phpMyAdmin program so that it will work with the mySQL database service on mysql.iu.edu?
Follow the steps below to configure a previously installed Webserve phpMyAdmin program for use with your database server on the mySQL database service:
- Login to your Webserve account.
- Change your working directory to the secure server
web document directory into which you installed the phpMyAdmin program.
- Change your working directory to the 'phpmyadmin' directory
that was created when you ran the installation procedure.
- Edit the file '.htaccess' and add the
IU Network IDs of individuals that you want to be
able to run the phpMyAdmin program that is installed in the
current directory. Add the names on the end of the line
beginning with 'require user' and separate each name with a space.
You may have more than one 'require user' line with associated
usernames in the file if you wish.
Keep in mind that each phpMyAdmin installation directory has
an associated '.htaccess' file in which you can edit
the 'require user' line
- Edit the file 'config.inc.php4' and locate the section of the
file shown below. As you edit the file, take care that lines do not wrap
to the next line as a result of your edits. If you notice that a line wraps as
you are entering information, correct the line so that it does not wrap.
Lines that wrap and are saved into the file are likely to cause the
phpMyAdmin program to not run correctly when you request it from your
web browser (see below).
The configuration file provides for the definition of three connections from which you can select from the opening page of the phpMyAdmin program.
The example below shows two connections defined; one for the mySQL 'root' user (fully privileged) connection and one for a non-root (less privileged) connection.
/**
* Server(s) configuration
*/
// The $cfgServers array starts with $cfgServers[1].
//Do not use $cfgServers[0].
// You can disable a server config entry by setting host to ''.
$cfgServers[1]['host'] = 'mysql.iu.edu'; // MySQL hostname
$cfgServers[1]['port'] = 'your port number'; // MySQL port
$cfgServers[1]['socket'] = ''; // Path to the socket
$cfgServers[1]['connect_type'] = 'tcp';
// How to connect to MySQL server ('tcp' or 'socket')
$cfgServers[1]['adv_auth'] = FALSE; // Use advanced authentication?
$cfgServers[1]['stduser'] = '';
// MySQL standard user (only needed with advanced auth)
$cfgServers[1]['stdpass'] = '';
// MySQL standard password (only needed with advanced auth)
$cfgServers[1]['user'] = 'root';
// MySQL user (only needed with basic auth)
$cfgServers[1]['password'] = 'your root password';
// MySQL password (only needed with basic auth)
$cfgServers[1]['only_db'] = '';
// If set to a db-name, only this db is accessible
// It may also be an array of db-names
$cfgServers[1]['verbose'] = '';
// Verbose name for this host - leave blank to show the hostname
$cfgServers[1]['bookmarkdb'] = '';
// Bookmark db - leave blank for no bookmark support
$cfgServers[1]['bookmarktable'] = '';
// Bookmark table - leave blank for no bookmark support
$cfgServers[2]['host'] = 'mysql.iu.edu';
$cfgServers[2]['port'] = 'your port number';
$cfgServers[2]['socket'] = '';
$cfgServers[2]['connect_type'] = 'tcp';
$cfgServers[2]['adv_auth'] = FALSE;
$cfgServers[2]['stduser'] = '';
$cfgServers[2]['stdpass'] = '';
$cfgServers[2]['user'] = 'your non-root user';
$cfgServers[2]['password'] = 'password for your non-root user';
$cfgServers[2]['only_db'] = '';
$cfgServers[2]['verbose'] = '';
$cfgServers[2]['bookmarkdb'] = '';
$cfgServers[2]['bookmarktable'] = '';
$cfgServers[3]['host'] = '';
$cfgServers[3]['port'] = '';
$cfgServers[3]['socket'] = '';
$cfgServers[3]['connect_type'] = 'tcp';
$cfgServers[3]['adv_auth'] = FALSE;
$cfgServers[3]['stduser'] = '';
$cfgServers[3]['stdpass'] = '';
$cfgServers[3]['user'] = '';
$cfgServers[3]['password'] = '';
$cfgServers[3]['only_db'] = '';
$cfgServers[3]['verbose'] = '';
$cfgServers[3]['bookmarkdb'] = '';
$cfgServers[3]['bookmarktable'] = '';
// If you have more than one server configured, you can set $cfgServerDefault
// to any one of them to autoconnect to that server when phpMyAdmin is started,
// or set it to 0 to be given a list of servers without logging in
// If you have only one server configured, $cfgServerDefault *MUST* be
// set to that server. $cfgServerDefault = 1;
// Default server (0 = no default server)
Using a web browser, how do I access the phpMyAdmin program to administer my databases?
Make sure that you have made the recommended edits to the '.htaccess' and 'config.inc.php4 files' and use the following example as a guide for accessing the phpMyAdmin program. In the example below, the 'phpMyAdmin' directory was created within the 'wwws' directory by the 'install_phpmyadmin' utility.
- You may access the phpMyAdmin interface by going to one of the
following (replace "myaccount" with the name of your web account):
https://www.indiana.edu/~myaccount/phpmyadmin
https://www.iupui.edu/~myaccount/phpmyadmin
https://www.iun.edu/~myaccount/phpmyadmin
https://www.iuk.edu/~myaccount/phpmyadmin
What on-line documentation for phpMyAdmin is available?
The opening page of the phpMyAdmin program contains web links to various sources of documentation.



