如何在本地phpmyadmin中设置/映射远程mysql数据库 [英] How to setup/map remote mysql db in local phpmyadmin

查看:300
本文介绍了如何在本地phpmyadmin中设置/映射远程mysql数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在远程开发服务器上工作。我有mysql主机名,db名,用户名,该远程服务器的密码。我想在我的本地phpmyadmin中设置/复制/映射dev服务器mysql,以便我可以本地访问远程服务器db(例如: - / mylocalip / remote-server-db)。
因此我不必做ssh连接并在终端打开mysql。我们如何在phpmyadmin / config.inc.php中做到这一点。

I am working on a remote development server. I have the mysql host name, db name, user name , password of that remote server. I want to setup/replicate/map that dev server mysql in my local phpmyadmin, so that I can access the remote server db locally(for ex :- /mylocalip/remote-server-db). Thus I don't have to do ssh connection and open the mysql in terminal. How can we do this in phpmyadmin/config.inc.php.

让我通过一个例子再次解释。假设远程服务器数据库可通过213.81.203.130/phpmyadmin访问。我想通过别名通过创建映射,即192.168.10.140/remote-db从我的本地ip访问该数据库。基本上,这可以通过在phpmyadmin / config.inc.php或config.db.php中添加一些类型的代码来完成。

Let me explain again through an example. Lets say the remote server db is accessible through 213.81.203.130/phpmyadmin. I want to access that db from my local ip through an alias name by creating a mapping i.e 192.168.10.140/remote-db. Basically this can be done by adding some sort of code in phpmyadmin/config.inc.php or config.db.php. But how to do it I am not sure.

推荐答案

如果你想避免使用终端,为什么不试试 MySQL Workbench 以连接到数据库?

If you want to avoid using terminal, why not try MySQL Workbench to connect to the database?

UPDATE

根据这个问题的所有观点,我添加了一个更准确地匹配问题的解决方案。请参见此链接,I相信会有所帮助。它涉及编辑phpmyadmin config.inc.php文件以添加其他服务器。这是如何保持localhost连接,并添加任何远程数据库连接。只需从登录屏幕的下拉菜单中选择服务器为phpmyadmin。

In light of all the views to this question, I am adding a solution that more accurately matches the question. Please see this link, I believe it will be helpful. It involves editing the phpmyadmin config.inc.php file to add additional servers. This is how you can keep your localhost connection, and add any remote db connections. Simply select the server from the drop down at the login screen to phpmyadmin.

这篇关于如何在本地phpmyadmin中设置/映射远程mysql数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆