Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to safely use MySQLGUI tools remotely

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

In this issue, the editor will bring you about how to safely use MySQLGUI tools remotely. The article is rich in content and analyzed and described from a professional point of view. I hope you can get something after reading this article.

MySQL database is a synonym for easy-to-use database. Most database-driven network applications take MySQL as the preferred database, so MySQL is applied on many network servers. Although the MySQL command statement tool is very useful, it will take a lot of time to work if you are not proficient in SQL syntax. So tools like phpMyAdmin emerge as the times require. The following editor will explain how to safely use MySQLGUI tools remotely.

How to safely use MySQLGUI tools remotely

MySQL developers have developed GUI tools that can connect to local or remote MySQL databases. These tools, including MySQL Manager (MySQLAdministrator), MySQLQuery browser (MySQLQueryBrowser), and MySQL Workbench (MySQLWorkbench), are excellent graphical tools that can easily operate and create MySQL databases.

One problem with using these tools to manipulate remote databases is that they often require MySQL to respond in the network interface; most MySQL administrators only allow MySQL to respond to localhost or socket and reject remote connections. This is a very effective security measure; but in this case, these GUI tools cannot be used remotely without some means. In this case, it's a good idea to use ssh to connect secretly. Because doing so not only allows for very strict authentication and encryption, but also does not break the rule that only MySQL is allowed to connect locally.

First, to have MySQL respond only to localhost (by default, MySQL only responds to requests to connect to the local socket), you need to adjust the settings so that MySQL allows network connections, and then restart the server. MySQL should only respond to connections on loopback, or connections on local and network interfaces. Then, edit the ~ / .ssh / config file on the host that issued the connection request, and insert the following:

How to safely use MySQLGUI tools remotely

Hostremotesql

Hostnamewebserver.domain.com

Userjoe

LocalForward*:13306localhost:3306

This connects to webserver.domain.com as user joe and pushes port 13306 on the local system to port 3306 (standard MySQL port) on webserver.domain.com. Note that we are not limiting the push port to the local interface of the local device, but to the entire interface; that is to say, we can connect to me.domain.com port 13306 (assuming me.domain.com is the name of the local workstation), except for connecting to local host port 13306 (this is very important because the GUI tool will try to connect to localhost through socket, which we do not want to happen). You can now execute the following command to start the connection.

$ssh-f-Nremotesql

Finally, start the MySQL manager and let it connect to me.domain.com on port 13306 using your letter of credit. If an access denied error occurs, check the license information on the remote database. In order to connect correctly, it may be necessary to license user@localhost.localdomain.

This makes it possible to securely connect across the Internet through any system on the local network (unless the rules of the firewall prohibit the use of local devices), so that the remote database can be manipulated through local MySQL command statements by:

$mysql-uroot-p-hme.domain.com-P13306

The above is the editor for you to share how to safely use MySQLGUI tools remotely, if you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report