entete eBusiness.be
imagegauche
 
 




La FAQ eBusiness

FAQ  > Programming and technique  > MySQL > How to configure PHPMyAdmin to manage an additional database ?

By default PHPMyAdmin is only configured to your initial database.
To handle the administration of other databases via PHPMyAdmin, you have to modify the configuration file config.inc.php to add the new databases.
In this file, you will find the following code block :

$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();

You have to modify it to specify in the following lines the username, the password and the database name.

$cfg[’Servers’][$i][’user’] = ’root’;
$cfg[’Servers’][$i][’password’] = ’’;
$cfg[’Servers’][$i][’only_db’] = ’’;

Has to become something like :

$cfg[’Servers’][$i][’user’] = ’votrelogin’;
$cfg[’Servers’][$i][’password’] = ’votremotdepasse’;
$cfg[’Servers’][$i][’only_db’] = ’lenomdevotrebase’;

To add a 3rd database, you only have to copy the first block of code of this document and specify the information regarding your 3rd database.


rect