From ArchWiki
Revision as of 10:24, 29 October 2009 by MindTooth (talk | contribs) (Installation)
Jump to navigation Jump to search


Read the LAMP wiki entry to setup apache, php and mysql.


To install phpMyAdmin just type this into the console.

#pacman -S phpmyadmin


Make sure you delete any old version of phpmyadmin.

rm -r /srv/httpd/phpMyAdmin

Copy the example configuration file to your httpd configuration file directory.

cp /etc/webapps/phpmyadmin/apache.example.conf /etc/httpd/conf/extra/httpd-phpmyadmin.conf

Add the following line to /etc/httpd/conf/httpd.conf:

Include conf/extra/httpd-phpmyadmin.conf

You can type this into the console to produce the same effect:

echo "\nInclude conf/extra/httpd-phpmyadmin.conf" >> /etc/httpd/conf/httpd.conf

Comment out (or delete) 'deny form all' in /usr/share/webapps/phpMyAdmin/.htaccess, the line should look like this:

#deny from all

Otherwise you will get "Error 403 - Access forbidden!" when you try to access your phpmyadmin installation.

Your '/etc/httpd/conf/extra/httpd-phpmyadmin.conf' should have the following information:

Alias /phpmyadmin/ "/usr/share/webapps/phpMyAdmin/"
        <Directory "/usr/share/webapps/phpMyAdmin">
                AllowOverride All
                Options FollowSymlinks
                Order allow,deny
                Allow from all

Open your '/etc/php/php.ini' and edit the line containing 'open_basedir' so it has the following:


For example, mine contains the following:

open_basedir = /srv/http/:/home/:/tmp/:/usr/share/pear/:/srv/:/usr/share/webapps/:/etc/webapps

Access your phpmyadmin installtion

You can access your phpmyadmin installation using the following url:


Note: 'localhost' is the hostname in your /etc/rc.conf file.

If you want to access it using:


in '/etc/httpd/conf/extra/httpd-phpmyadmin.conf' change:

Alias /phpmyadmin/ "/usr/share/webapps/phpMyAdmin/"


Alias /phpmyadmin "/usr/share/webapps/phpMyAdmin"

You should also read this thread.

Other (Older) information

This page holds a sample '' file that you can place in the main phpMyAdmin directory so that it immediately starts working

Things you should do first

Create a 'controluser', so that phpmyadmin can read from the main mysql database.

mysql -u root -pYOURROOTPASSWORD
mysql> grant usage on mysql.* to controluser@localhost identified by 'CONTROLPASS';

Where is phpmyadmin

in phpmyadmin 3.2.2-3 the file is missing /srv/http/ create this symlik

ln -s /usr/share/webapps/phpMyAdmin/ /srv/http/phpmyadmin

Things you should change

controluser is set to controluser
controlpass is set to password
verbose is set to name_of_server

Sample '' file

 * Generated configuration file
 * Generated by: phpMyAdmin setup script by Michal Čihař <>
 * Version: $Id: setup.php 11423 2008-07-24 17:26:05Z lem9 $
 * Date: Mon, 01 Sep 2008 20:34:02 GMT

/* Servers configuration */
$i = 0;

/* Server ravi-test-mysql (http) [1] */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['port'] = '3306';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['controluser'] = 'controluser';
$cfg['Servers'][$i]['controlpass'] = 'password';
$cfg['Servers'][$i]['auth_type'] = 'http';
$cfg['Servers'][$i]['verbose'] = 'name_of_server';

/* End of servers configuration */

$cfg['LeftFrameLight'] = true;
$cfg['LeftFrameDBTree'] = true;
$cfg['LeftFrameDBSeparator'] = '_';
$cfg['LeftFrameTableSeparator'] = '__';
$cfg['LeftFrameTableLevel'] = 1;
$cfg['LeftDisplayLogo'] = true;
$cfg['LeftDisplayServers'] = false;
$cfg['DisplayServersList'] = false;
$cfg['DisplayDatabasesList'] = 'auto';
$cfg['LeftPointerEnable'] = true;
$cfg['DefaultTabServer'] = 'main.php';
$cfg['DefaultTabDatabase'] = 'db_structure.php';
$cfg['DefaultTabTable'] = 'tbl_structure.php';
$cfg['LightTabs'] = false;
$cfg['ErrorIconic'] = true;
$cfg['MainPageIconic'] = true;
$cfg['ReplaceHelpImg'] = true;
$cfg['NavigationBarIconic'] = 'both';
$cfg['PropertiesIconic'] = 'both';
$cfg['BrowsePointerEnable'] = true;
$cfg['BrowseMarkerEnable'] = true;
$cfg['ModifyDeleteAtRight'] = false;
$cfg['ModifyDeleteAtLeft'] = true;
$cfg['RepeatCells'] = 100;
$cfg['DefaultDisplay'] = 'horizontal';
$cfg['TextareaCols'] = 40;
$cfg['TextareaRows'] = 7;
$cfg['LongtextDoubleTextarea'] = true;
$cfg['TextareaAutoSelect'] = false;
$cfg['CharEditing'] = 'input';
$cfg['CharTextareaCols'] = 40;
$cfg['CharTextareaRows'] = 2;
$cfg['CtrlArrowsMoving'] = true;
$cfg['DefaultPropDisplay'] = 'horizontal';
$cfg['InsertRows'] = 2;
$cfg['EditInWindow'] = true;
$cfg['QueryWindowHeight'] = 310;
$cfg['QueryWindowWidth'] = 550;
$cfg['QueryWindowDefTab'] = 'sql';
$cfg['ForceSSL'] = false;
$cfg['ShowPhpInfo'] = false;
$cfg['ShowChgPassword'] = false;
$cfg['AllowArbitraryServer'] = false;
$cfg['LoginCookieRecall'] = 'something';
$cfg['LoginCookieValidity'] = 1800;