Copied /etc/phpmyadmin/config-db.php to config-db1.php to config-db4.php.
Added fields so they look like:
## worry about manual changes being silently discarded. *however*,Modified central part of /etc/phpmyadmin/config.php.inc to look like:
## you'll probably also want to edit the configuration file mentioned
## above too.
##
$dbuser='phpmyadmin';
$dbpass='';
$basepath='';
$dbname='phpmyadmin';
$dbverbose='Erls Database';
$dbserver='';
$dbport='';
$dbsocket='/var/run/mysqld/mysqld2.sock';
$dbtype='mysql';
/**Seems to work!
* Server(s) configuration
*/
for( $i = 1; $i < 5; $i++ )
{
// The $cfg['Servers'] array starts with $cfg['Servers'][1]. Do not use $cfg['Servers'][0].
// You can disable a server config entry by setting host to ''.
// $i++;
/* Read configuration from dbconfig-common */
require('/etc/phpmyadmin/config-db'.$i.'.php');
/* Configure according to dbconfig-common if enabled */
if (!empty($dbname)) {
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
if (empty($dbserver)) $dbserver = 'localhost';
$cfg['Servers'][$i]['host'] = $dbserver;
if (!empty($dbport)) {
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['port'] = $dbport;
}
if (!empty($dbsocket)) {
$cfg['Servers'][$i]['connect_type'] = 'socket';
$cfg['Servers'][$i]['socket'] = $dbsocket;
}
# The text name of the server to be shown in the login menu
if (!empty( $dbverbose ) )
$cfg['Servers'][$i]['verbose'] = $dbverbose;
//$cfg['Servers'][$i]['compress'] = false;
/* Select mysqli if your server has it */
$cfg['Servers'][$i]['extension'] = 'mysqli';
/* Optional: User for advanced features */
$cfg['Servers'][$i]['controluser'] = $dbuser;
$cfg['Servers'][$i]['controlpass'] = $dbpass;
/* Optional: Advanced phpMyAdmin features */
$cfg['Servers'][$i]['pmadb'] = $dbname;
$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';
/* Advance to next server for rest of config */
/* Now done in for loop */
// $i++;
}
}
No comments:
Post a Comment