Ubuntu Server Guide

Add to my manuals
308 Pages

advertisement

Ubuntu Server Guide | Manualzz

LAMP Applications

4. phpMyAdmin

phpMyAdmin is a LAMP application specifically written for administering MySQL servers. Written in PHP, and accessed through a web browser, phpMyAdmin provides a graphical interface for database administration tasks.

4.1. Installation

Before installing phpMyAdmin you will need access to a MySQL database either on the same host as that phpMyAdmin is installed on, or on a host accessible over the network. For more information see

Section 1, “MySQL” [p. 157]. From a terminal prompt enter:

sudo apt-get install phpmyadmin

At the prompt choose which web server to be configured for phpMyAdmin. The rest of this section will use Apache2 for the web server.

In a browser go to http://servername/phpmyadmin, replacing serveranme with the server's actual hostname. At the login, page enter root for the username, or another MySQL user if you any setup, and enter the MySQL user's password.

Once logged in you can reset the root password if needed, create users, create/destroy databases and tables, etc.

4.2. Configuration

The configuration files for phpMyAdmin are located in

/etc/phpmyadmin

. The main configuration file is

/etc/phpmyadmin/config.inc.php

. This file contains configuration options that apply globally to phpMyAdmin.

To use phpMyAdmin to administer a MySQL database hosted on another server, adjust the following in

/etc/phpmyadmin/config.inc.php

:

$cfg['Servers'][$i]['host'] = 'db_server';

Replace db_server with the actual remote database server name or IP address. Also, be sure that the phpMyAdmin host has permissions to access the remote database.

Once configured, log out of phpMyAdmin and back in, and you should be accessing the new server.

The config.header.inc.php

and config.footer.inc.php

files are used to add a HTML header and footer to phpMyAdmin.

Another important configuration file is

/etc/phpmyadmin/apache.conf

, this file is symlinked to

/ etc/apache2/conf.d/phpmyadmin.conf

, and is used to configure Apache2 to serve the phpMyAdmin

167

LAMP Applications site. The file contains directives for loading PHP, directory permissions, etc. For more information on

configuring Apache2 see Section 1, “HTTPD - Apache2 Web Server” [p. 139].

4.3. References

• The phpMyAdmin documentation comes installed with the package and can be accessed from the

phpMyAdmin Documentation link (a question mark with a box around it) under the phpMyAdmin logo. The official docs can also be access on the phpMyAdmin

7

site.

• Also, Mastering phpMyAdmin

8

is a great resource.

• A third resource is the phpMyAdmin Ubuntu Wiki

9

page.

168

advertisement

Was this manual useful for you? Yes No
Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Related manuals

Download PDF

advertisement

Table of contents