Home Database Mysql Tutorial 远程MySQL GUI工具的使用

远程MySQL GUI工具的使用

Jun 07, 2016 pm 04:13 PM
gui mysql use tool us Know Remotely

我们大家都知道MySQL(和PHP搭配之最佳组合)开发者们研究出了能够连接本地或是远程MySQL GUI工具。以下的文章就是对远程使用MySQL GUI工具德详细内容描述,希望会给你带来一些帮助在此方面。 这些工具包括MySQL(和PHP搭配之最佳组合)管理员(MySQL(和PHP搭配之

我们大家都知道MySQL(和PHP搭配之最佳组合)开发者们研究出了能够连接本地或是远程MySQL GUI工具。以下的文章就是对远程使用MySQL GUI工具德详细内容描述,希望会给你带来一些帮助在此方面。

这些工具包括MySQL(和PHP搭配之最佳组合)管理员(MySQL(和PHP搭配之最佳组合) Administrator),MySQL(和PHP搭配之最佳组合) Query浏览器(MySQL(和PHP搭配之最佳组合) Query Browser)以及MySQL(和PHP搭配之最佳组合) 工作台(MySQL(和PHP搭配之最佳组合) Workbench)等,都是相当出色的能够轻松操作和创建MySQL(和PHP搭配之最佳组合)数据库的图形化工具。

使用这些工具操作远程数据库时有一个问题,它们经常要求MySQL(和PHP搭配之最佳组合) 在网络界面进行响应;大部分MySQL(和PHP搭配之最佳组合)管理员只允许MySQL(和PHP搭配之最佳组合)对localhost或socket进行响应,而拒绝远程连接。这是一种非常有效的安全措施;

但是在这种情况下,如果不施展一些手段就无法远程使用这些MySQL GUI工具。在这种情况下,使用ssh来暗中进行连接是一个非常不错的方法。因为这样做不仅能够进行很严格的认证和加密,同时还不会破坏只允许MySQL(和PHP搭配之最佳组合)相应本地连接的规则。

首先,要使MySQL(和PHP搭配之最佳组合)只响应localhost(在默认情况下,MySQL(和PHP搭配之最佳组合)只响应对连接本地socket的要求),需要调整设置让MySQL(和PHP搭配之最佳组合)允许网络连接,然后重启服务器。MySQL(和PHP搭配之最佳组合)应该只响应loopback上的连接,或者本地及网络界面上的连接。

然后,编辑发出连接要求的主机上的 ~/.ssh/config文件,然后插入以下内容:

<ol class="dp-xml">
<li class="alt"><span><span>Host remotesql  </span></span></li>
<li><span>?Hostname webserver.domain.com  </span></li>
<li class="alt"><span>?User joe  </span></li>
<li><span>?LocalForward *:13306 localhost:3306  </span></li>
</ol>
Copy after login

这样就会以用户joe的身份连接到webserver.domain.com,并将本地系统上13306端口推送到 webserver.domain.com上的3306端口(标准MySQL(和PHP搭配之最佳组合)端口)。请注意,我们并没有将推送端口限制在本地设备的本地界面上,而是针对全部界面;

也就是说我们能够连接到me.domain.com端口13306(假设me.domain.com是本地工作站的名称),除了连接本地主机端口13306(这点非常重要,因为MySQL GUI工具将会尝试通过socket连接localhost,而这是我们所不希望发生的)。现在可以执行以下命令来启动连接。

<ol class="dp-xml"><li class="alt"><span><span>$ ssh -f -N remotesql </span></span></li></ol>
Copy after login

最后,启动MySQL(和PHP搭配之最佳组合)管理器,让其使用你的信用状与13306端口上的me.domain.com进行连接。如果出现"访问被拒绝“的错误,请检查远程数据库上的许可信息。为了进行正确的连接,可能必须对user@localhost.localdomain进行许可。

这样就可以实现通过本地网络上的任一系统(除非防火墙的规则禁止使用本地设备)跨过互联网进行安全的连接,这样就可以通过以下操作通过本地MySQL(和PHP搭配之最佳组合) 命令语句来对远程数据库进行操作:

<ol class="dp-xml"><li class="alt"><span><span>$ MySQL(和PHP搭配之最佳组合) -u root -p -h me.domain.com -P 13306 </span></span></li></ol>
Copy after login

以上的相关内容就是对MySQL GUI工具的介绍,望你能有所收获。
 


Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Which libraries in Go are developed by large companies or provided by well-known open source projects? Which libraries in Go are developed by large companies or provided by well-known open source projects? Apr 02, 2025 pm 04:12 PM

Which libraries in Go are developed by large companies or well-known open source projects? When programming in Go, developers often encounter some common needs, ...

How to use Golang to implement Caddy-like background running, stop and reload functions? How to use Golang to implement Caddy-like background running, stop and reload functions? Apr 02, 2025 pm 02:12 PM

How to implement background running, stopping and reloading functions in Golang? During the programming process, we often need to implement background operation and stop...

How to solve the problem of Golang generic function type constraints being automatically deleted in VSCode? How to solve the problem of Golang generic function type constraints being automatically deleted in VSCode? Apr 02, 2025 pm 02:15 PM

Automatic deletion of Golang generic function type constraints in VSCode Users may encounter a strange problem when writing Golang code using VSCode. when...

How to specify the database associated with the model in Beego ORM? How to specify the database associated with the model in Beego ORM? Apr 02, 2025 pm 03:54 PM

Under the BeegoORM framework, how to specify the database associated with the model? Many Beego projects require multiple databases to be operated simultaneously. When using Beego...

How to correctly import custom packages under Go Modules? How to correctly import custom packages under Go Modules? Apr 02, 2025 pm 03:42 PM

In Go language development, properly introducing custom packages is a crucial step. This article will target "Golang...

How to manually trigger the onBlur event of a cell in Avue-crud row editing mode? How to manually trigger the onBlur event of a cell in Avue-crud row editing mode? Apr 04, 2025 pm 02:00 PM

The onBlur event that implements Avue-crud row editing in the Avue component library manually triggers the Avue-crud component. It provides convenient in-line editing functions, but sometimes we need to...

In Go programming, how to correctly manage the connection and release resources between Mysql and Redis? In Go programming, how to correctly manage the connection and release resources between Mysql and Redis? Apr 02, 2025 pm 05:03 PM

Resource management in Go programming: Mysql and Redis connect and release in learning how to correctly manage resources, especially with databases and caches...

When using sql.Open, why does not report an error when DSN passes empty? When using sql.Open, why does not report an error when DSN passes empty? Apr 02, 2025 pm 12:54 PM

When using sql.Open, why doesn’t the DSN report an error? In Go language, sql.Open...

See all articles