我已经在我的local
环境中使用phpMyAdmin
一段时间了。它带有WAMP服务器。我真的很喜欢它。我想知道是否可以将我的开发/生产服务器也与它连接起来。
截至目前,我已经使用 MySQL WorkBench
一段时间了。我真的不太喜欢它。
如果有人对此有任何经验,我希望您不介意给我一些建议/建议。
phpMyAdmin可以通过在config.inc.php
中设置单个服务器连接详细信息来连接到多个服务器。 您需要为每个服务器设置 $cfg["服务器"][$i] 数组。 有关详细信息,请参阅 phpMyAdmin wiki:https://wiki.phpmyadmin.net/pma/Multiserver(这是以下示例的来源)
$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
确保完全了解你在做什么以及如何连接,你不想仅仅为了使用 phpMyAdmin而向外界开放对数据库的访问。