问题描述
我已经在我的 local 环境中使用 phpMyAdmin 一段时间了.它带有 WAMP 服务器.我很喜欢.我想知道是否也可以将我的开发/生产服务器与它连接起来.
I’ve been using phpMyAdmin on my local environment for quit a while now.
It comes with WAMP Server. I really like it. I was wondering if it’s possible to connect my dev/prod servers with it too.
到目前为止,我使用 MySQL WorkBench 已经有一段时间了.我不是很喜欢它.
As of now, I've using MySQL WorkBench for quite awhile now. I don't really like it that much.
如果有人对此有任何经验,我希望您不介意给我一些建议/建议以超越这一点.
If anyone have any experience with that, I hope you don’t mind give me some advice/suggestion to go above this.
推荐答案
phpMyAdmin 可以通过在 config.inc.php 中设置单个服务器连接详细信息来连接到多个服务器.您需要为每个服务器设置 $cfg['Servers'][$i] 数组.有关详细信息,请参阅 phpMyAdmin wiki:https://wiki.phpmyadmin.net/pma/Multiserver(这是以下示例的来源)
phpMyAdmin can connect to multiple servers by setting individual server connection details in config.inc.php. You need To set $cfg['Servers'][$i] arrays for each server. See the phpMyAdmin wiki for details: https://wiki.phpmyadmin.net/pma/Multiserver (which is where the example below is from)
$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 而向外界开放对您的数据库的访问.
Make sure to fully understand what you are doing and how you are connecting, you don't want to open access to your database to the outside world just to use phpMyAdmin.
这篇关于如何使用 phpMyAdmin 连接到您的 Prod/Dev 数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!



大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)