使用 phpMyAdmin 連線至外部伺服器
以下程式碼行可以新增到 /etc/phpmyadmin/config.inc.php 檔案底部 −
$i++; $cfg['Servers'][$i]['host'] = 'HostName:port'; // hostname and port are provided if they are not default values $cfg['Servers'][$i]['user'] = 'userName'; //user name for the remote server $cfg['Servers'][$i]['password'] = 'Password'; //the password $cfg['Servers'][$i]['auth_type'] = 'config';
它將顯示“當前伺服器:”,下拉選單中既包括“127.0.0.1”,也包括 $cfg['Servers'][$i]['host'] 提供的伺服器。
使用者可以在這兩個伺服器之間進行切換。
廣告