Use of remote MySQL GUI tools

Source: Internet
Author: User
Tags mysql gui mysql gui tools

We all know that MySQL (the best combination with PHP) developers have developed a MySQL GUI tool that can connect to a local computer or remotely. The following is a detailed description of the remote use of the MySQL GUI tool. We hope to provide you with some help in this regard.

These tools include the MySQL (the best combination with PHP) Administrator (MySQL (the best combination with PHP) Administrator) and MySQL (the best combination with PHP) query Browser (the best combination of MySQL and PHP) and MySQL (the best combination of PHP) Workbench (the best combination of MySQL (and PHP) Workbench, they are all excellent graphical tools that can easily operate and create MySQL databases (the best combination with PHP.

There is a problem when using these tools to operate remote databases. They often require MySQL (the best combination with PHP) to respond on the network interface. Most MySQL (the best combination with PHP) the Administrator only allows MySQL (the best combination with PHP) to respond to localhost or socket, and rejects remote connection. This is a very effective security measure;

However, in this case, these MySQL GUI tools cannot be remotely used without some means. In this case, using ssh to secretly connect is a very good method. In this way, not only strict authentication and encryption can be performed, but also the rules that allow only MySQL (the best combination with PHP) local connections will not be broken.

First, make MySQL (the best combination with PHP) only respond to localhost (by default, MySQL (the best combination with PHP) only respond to requirements for connecting to the local socket), you need to adjust the settings to allow MySQL (the best combination with PHP) to allow network connection, and then restart the server. MySQL (the best combination with PHP) should only respond to connections on loopback or local and network interfaces.

Then, edit ~ /. Ssh/config file, and insert the following content:

 
 
  1. Host remotesql  
  2. ?Hostname webserver.domain.com  
  3. ?User joe  
  4. ?LocalForward *:13306 localhost:3306  

This will connect to webserver.domain.com as user joe, and push port 13306 (the best combination of standard MySQL and PHP) on the local system to webserver.domain.com ). Note that the push port is not restricted to the local interface of the local device, but for all interfaces;

That is to say, we can connect to me.domain.com port 13306 (assuming me.domain.com is the name of the local workstation), in addition to connecting to the local host port 13306 (this is very important, because the MySQL GUI tool will try to connect to localhost through socket, this is what we don't want to happen ). Now you can run the following command to start the connection.

 
 
  1. $ ssh -f -N remotesql 

Finally, start the MySQL (best combination with PHP) manager to connect it to me.domain.com on port 13306 using your credit card. If an "Access Denied" error occurs, check the permission information on the remote database. User@localhost.localdomain may have to be licensed for the right connection.

In this way, you can achieve a secure connection over the Internet through any system on the local network (unless the firewall rules prohibit the use of local devices, in this way, you can use the following command statement to operate a remote database through local MySQL (the best combination with PHP:

 
 
  1. $ MySQL (best combination with PHP)-u root-p-h me.domain.com-P 13306

The above content is an introduction to the MySQL GUI tool. I hope you will get some benefits.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.