Logo Page Web Française
Accueil Association BSD Linux Dev Reseau Infologisme Mac OSX
tl tr
Subject Setup Date 2010-08-20
Title phpMyAdmin-2.11.10.1 - MySQL Server Administration Section BSD Linux
Article

phpMyAdmin


Installing of phpMyAdmin-3.3.6-all-languages.tar.gz see article: phpMyAdmin-3.3.6 - Fedora FreeBSD Install

Install phpMyAdmin in a Linux distribution Fedora. Essential tool to create and manage data bases MySQL.

Understand the philosophy of the product:

PhpMyAdmin is software to develop in Web page php. So one needs three paramount things it to make go, Apache, PHP and MySQL installed and functional in Linux server. You will also need Webmin to carry out some operations of administration.

Necessary softwares and servers: Apache, Mysql and PHP

Operating system: Fedora 12 FC12 or FreeBSD or another Unix

Components or Packages necessary for phpMyAdmin.


The components or modules from PHP-5.3.2 which are required:

php5-bsdconv-3.5 * Option for FreeBSD
php5-bz2-5.3.2
php5-ctype-5.3.2
php5-gd-5.3.2
php5-mbstring-5.3.2
php5-mcrypt-5.3.2
php5-mysql-5.3.2
php5-openssl-5.3.2
php5-session-5.3.2
php5-zlib-5.3.2


For installation of phpMyAdmin with Apache, Mysql and PHP for FreeBSD see the articles below :

FreeBSD - Install and Configure version 7.3-RELEASE
FreeBSD - Install and Configure version 8.1-RELEASE


Remark : The directory of the "root document" from Web Server Apache

FreeBSD /usr/local/www/html
Linux Fedora /var/www/html


See article on the installation of Webmin - System and server administration

Symptom : Apache does not serve phpMyAdmin !
See article Apache with the ModSecurity package


Order of the operations of installation:

Download phpMyAdmin-2.11.10.1-all-languages.tar.gz and decompressed it with xArchiver or the following order:

tar - xzvf phpMyAdmin-2.11.10.1-all-languages.tar.gz

Then to copy it in file /var/www/html it's the repertory "document root" of the Web server Apache.

Rename the repertory phpMyAdmin-2.11.10.1-all-languages.tar.gz in phpmyadmin, it's simpler.

With Webmin with section Networking then Network Configuration then Network Interfaces Add a new interface (Ethernet Virtual).

Click on eth0 with the section Active Now then on (Add virtual interface).

Repeat operation To click on eth0 Interfaces Activated at Boot Time.

 *  Address diffusion or broadcast 192.168.1.255 for Adresse IP 192.168.1.12/24 or Masks sub-network 255.255.255.0

You must obtain a nearby result according to the class selected network.

Interfaces Active Now
Select all. | Invert selection. | Add a new interface.
 Name  Type  IP Address  Netmask  Status
eth0 Ethernet 192.168.1.10 255.255.255.0 Up
eth0:0 Ethernet (Virtual) 192.168.1.12 255.255.255.0 Up
lo Loopback 127.0.0.1 255.0.0.0 Up
Select all. | Invert selection. | Add a new interface.
Interfaces Activated at Boot Time
Select all. | Invert selection. | Add a new interface. | Add a new address range.
 Name  Type  IP Address  Netmask  Activate at boot?
eth0 Ethernet 192.168.1.10 255.255.255.0 Yes
eth0:0 Ethernet (Virtual) 192.168.1.12 255.255.255.0 Yes
lo Loopback 127.0.0.1 255.0.0.0 Yes
Select all. | Invert selection. | Add a new interface. | Add a new address range.

With Webmin in section Networking then Network Configuration Click this button to activate   the network setting.

With Webmin in section Servers then Apache Webserver to create a new Virtual Server

 Create a New Virtual Server
Handle connections to address   Those not handled by another server
Any address
Specific address .. 
Add name virtual server address (if needed)
Listen on address (if needed)
Port Default Any
Document Root
Allow access to this directory
Server Name Automatic
Add virtual server to file Standard httpd.conf file
Selected file.. 
Copy directives from

The version script:

<VirtualHost phpMyAdmin>
DocumentRoot "/var/www/html/phpMyAdmin" *FreeBSD /usr/local/www/html/phpMyAdmin
ServerName phpMyAdmin
<Directory "/var/www/html/phpMyAdmin"> *FreeBSD /usr/local/www/html/phpMyAdmin
allow from all
Options +Indexes
</Directory>
AddDefaultCharset iso-8859-1
DefaultLanguage en
LanguagePriority en
</VirtualHost>


To activate the changes in Apache Webserver while clicking on Apply Changes.

This stage it remains to create a base of give MySQL for phpmyadmin, all into tiny.

With Webmin in section Serveurs then MySQL Database Server then Create a new database to create a data base empties of phpmyadmin name. Click on the database phpmyadmin then on 

In the following section:


Select an SQL commands file to execute on database phpmyadmin.
This can also be used to restore a MySQL backup, which is just a file of SQL commands.
From local file
From uploaded file


Select the path /var/www/html/phpmyadmin/scripts/create_tables_mysql_4_1_2+.sql then to click on  

The file create_tables_mysql_4_1_2+.sql the instruction contains MySQL drop table who allows to erase the old tables.

* If your MySQL server's version is 4.1.2 or later, please use create_tables_mysql_4_1_2+.sql instead, for a new installation.

And now, to configure the file config.inc.php

Go in the file libraries of phpMyAdmin and to copy the file config.default.php in the file or repertory root of phpMyAdmin and rename in config.inc.php and to configure it as indicated above.

To locate it to go in the repertory /var/www/html/phpmyadmin and to copy it with gEdit and to modify the following line:


<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* phpMyAdmin sample configuration, you can use it as base for
* manual configuration. For easier setup you can use scripts/setup.php
*
* All directives are explained in Documentation.html and on phpMyAdmin
* wiki <http://wiki.phpmyadmin.net>.
*
* @version $Id: config.sample.inc.php 12304 2009-03-24 12:56:58Z nijel $
*/

/*
* Type the password root@localhost of MySQL for an authentification by Cookie.
*/

$cfg['blowfish_secret'] = 'MotDePasse'; /* The Administrator Password from Mysql */

/*
* Servers configuration
*/
$i = 0;

/*
* First server
*/
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysql';

/* User for advanced features */
// $cfg['Servers'][$i]['controluser'] = 'pma';
// $cfg['Servers'][$i]['controlpass'] = 'pmapass';

/* Advanced phpMyAdmin features */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark';
$cfg['Servers'][$i]['relation'] = 'pma_relation';
$cfg['Servers'][$i]['table_info'] = 'pma_table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma_column_info';
$cfg['Servers'][$i]['history'] = 'pma_history';
$cfg['Servers'][$i]['designer_coords'] = 'pma_designer_coords';


/*
* End of servers configuration
*/

/*
* Directories for saving/loading files from server
*/
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';

?>



Epilogue

Not to forget to configure correctly the « root » password in MySQL in the table User Permissions.


See article MySQL - Authenticate Password and Protect


Start or launch phpMyAdmin

Add this line in the hosts file:

192.168.1.12    phpMyAdmin

Type in Firefox the IP address of the Virtual Server used in Apache phpMyAdmin


phpMyAdmin English documentation.

Use preferably FireFox or Mozilla because IE badly interprets the style sheets of this new version!

Author
Eric Douzet
Début de page
bl br
C-extra.com v. 1.2.0 © 2003-2010, all rights reserved  -  Updated September 02, 2010 Infologism.com