Thursday, November 3, 2011

How to add multiple servers to phpMyAdmin

Add the following to your phpmyadmin/config.inc.php file for each additional server:


$i++;
$cfg['Servers'][$i]['host'] = '192.245.1.234';
$cfg['Servers'][$i]['port'] = '3306';
$cfg['Servers'][$i]['socket'] = '';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysql';
$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'; // 'phpmyadmin' - see scripts/create_tables.sql
$cfg['Servers'][$i]['bookmarktable'] = 'pma_bookmark'; // 'pma_bookmark'
$cfg['Servers'][$i]['relation'] = 'pma_relation'; // 'pma_relation'
$cfg['Servers'][$i]['table_info'] = 'pma_table_info'; // 'pma_table_info'
$cfg['Servers'][$i]['table_coords'] = 'pma_table_coords'; // 'pma_table_coords'
$cfg['Servers'][$i]['pdf_pages'] = 'pma_pdf_pages'; // 'pma_pdf_pages'
$cfg['Servers'][$i]['column_info'] = 'pma_column_info'; // 'pma_column_info'
$cfg['Servers'][$i]['history'] = 'pma_history'; // 'pma_history'
$cfg['Servers'][$i]['verbose_check'] = TRUE;
$cfg['Servers'][$i]['AllowRoot'] = TRUE;
$cfg['Servers'][$i]['AllowDeny']['order']
= '';
$cfg['Servers'][$i]['AllowDeny']['rules']
= array();




If you have only one server configured, $cfg['ServerDefault'] = 1;


// If you have more than one server configured, you can set $cfg['ServerDefault']
// 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, $cfg['ServerDefault'] *MUST* be
// set to that server.
//$cfg['ServerDefault'] = 1; // Default server (0 = no default server)


Append the following lines if you have configured multiple servers to your phpmyadmin.


$cfg['ServerDefault'] = 0; // Default server (0 = no default server)
$cfg['Server'] = '';
unset($cfg['Servers'][0]);


SOURCE:
http://www.facebook.com/topic.php?uid=115960095095777&topic=70


No comments:

Post a Comment