PHP
  Home arrow PHP arrow Page 4 - Doing More With phpMyAdmin (Part 1)
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Doing More With phpMyAdmin (Part 1)
By: Harish Kamath, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 143
    2003-10-27


    Table of Contents:
  • Doing More With phpMyAdmin (Part 1)
  • Start Me Up
  • Locking the Doors
  • The More the Merrier
  • A Perfect State
  • The Privileged Few
  • In and Out
  • Mood Ring

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Doing More With phpMyAdmin (Part 1) - The More the Merrier
    ( Page 4 of 8 )

    You can also use phpMyAdmin to manage multiple database servers using the same instance of phpMyAdmin. Go back to the phpMyAdmin configuration file, and take a closer look at the server configuration block you manipulated earlier.

    If you keep reading, you'll notice that the first configuration block is followed by many similar blocks, each one configured by default with empty values.

    $i++;
    $cfg['Servers'][$i]['host'] = '';
    $cfg['Servers'][$i]['port'] = '';
    $cfg['Servers'][$i]['socket'] = '';
    $cfg['Servers'][$i]['connect_type'] = 'tcp';
    $cfg['Servers'][$i]['compress'] = FALSE;
    $cfg['Servers'][$i]['controluser'] = '';
    $cfg['Servers'][$i]['controlpass'] = '';
    $cfg['Servers'][$i]['auth_type'] = 'config';
    $cfg['Servers'][$i]['user'] = 'root';
    $cfg['Servers'][$i]['password'] = '';
    $cfg['Servers'][$i]['only_db'] = '';
    $cfg['Servers'][$i]['verbose'] = '';
    $cfg['Servers'][$i]['pmadb'] = ''; // 'phpmyadmin' - see scripts/create_tables.sql
    $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]['verbose_check'] = TRUE;
    $cfg['Servers'][$i]['AllowDeny']['order']
        = ''; $cfg['Servers'][$i]['AllowDeny']['rules']
        = array();

    In order to manage more than one server with phpMyAdmin, therefore, all you need to do is configure more servers, by setting values for each block. In case you run out (the default configuration file for phpMyAdmin supports 2 servers other than the primary one), just replicate an empty block (like the one) above and set values for it in the normal manner.

    Once multiple servers have been configured, phpMyAdmin will first display a list of servers, and allow you to select a server from the list for use, as seen here.

    Note that phpMyAdmin does not automatically connect to all the configured servers on startup; it only attempts a connection when a user selects a server.

    In case you need to disable access to a server temporarily, simply set the "host" parameter of the corresponding configuration block to empty, and the server will be ignored by phpMyAdmin

    You can also have phpMyAdmin automatically attempt a connection to any one of the listed servers via the $cfg['ServerDefault'] variable in the configuration file. For example,

    $cfg['ServerDefault'] = 2;

     
     
    >>> More PHP Articles          >>> More By Harish Kamath, (c) Melonfire
     

       

    PHP ARTICLES

    - Building Dynamic Queries with Chainable Meth...
    - PHP Encryption and Decryption Methods
    - Building a MySQL Abstraction Class with Meth...
    - Completing a Sample String Processor with Me...
    - Mastering WHILE Loops for PHP and MySQL
    - Method Chaining: Adding More Methods to the ...
    - Method Chaining in PHP 5
    - The Role of Interfaces in Applying the Depen...
    - Dependency Injection: Using a Setter Method ...
    - Using a Model Class with the Dependency Inje...
    - Injecting Objects Using Setter Methods with ...
    - Injecting Objects by Constructor with the De...
    - The Dependency Injection Design Pattern in P...
    - Performing Inferential Statistical Analysis ...
    - Performing Descriptive Statistical Analysis ...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    Stay green...Green IT