phpMyAdmin
 sql >> Database >  >> Database Tools >> phpMyAdmin

Come connettersi al tuo database Prod/Dev usando phpMyAdmin?

phpMyAdmin può connettersi a più server impostando i dettagli di connessione del singolo server in config.inc.php . Devi impostare $cfg['Servers'][$i] array per ogni server. Consulta il wiki di phpMyAdmin per i dettagli:https://wiki.phpmyadmin.net/pma/Multiserver (da cui proviene l'esempio seguente)

$cfg['blowfish_secret']='multiServerExample70518';
//any string of your choice (max. 46 characters)
$i = 0;  

$i++; // server 1 :
$cfg['Servers'][$i]['auth_type'] = 'cookie'; // needed for pma 2.x
$cfg['Servers'][$i]['verbose']   = 'no1'; 
$cfg['Servers'][$i]['host']      = 'localhost';
$cfg['Servers'][$i]['extension'] = 'mysqli';
// more options for #1 ...

$i++; // server 2 :
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['verbose']   = 'no2'; 
$cfg['Servers'][$i]['host']      = 'remote.host.addr';//or ip:'10.9.8.1'
// this server must allow remote clients, e.g., host 10.9.8.%
// not only in mysql.host but also in the startup configuration
$cfg['Servers'][$i]['extension'] = 'mysqli';
// more options for #2 ... 

// end of server sections
$cfg['ServerDefault'] = 0; // to choose the server on startup

Assicurati di comprendere appieno cosa stai facendo e come ti stai connettendo, non vuoi aprire l'accesso al tuo database al mondo esterno solo per usare phpMyAdmin.