[Basic problem] solution for remote connection to MySQL

Source: Internet
Author: User

Today, we are going to test the upgrade of our APM monitoring product. This test is very complicated.

1. first, you need to deploy the server as the master to 10 Operating Systems (Aix, RedHat, Solaris, Windows ia32, Windows 64, centos .....), in fact, this master server is not responsible for monitoring.

2. Then it will link two child servers. These child servers are the machines to be monitored.

The process of configuring the test environment is very abnormal and complex, but it is okay that the configuration is complete at the end.

However, a problem occurred. I configured a MySQL database in the LAN, but other hosts in the LAN could not be connected !.

First, I checked the firewall. For example, if my MySQL server is deployed on Windows Server 2003, I first shut down the Firewall Service on Windows 2003. As a result, other hosts still cannot be connected.

Colleague Jerry said that by default, after MySQL is installed on Windows, it can only be connected to the local localhost. Then I went to the MySQL manual and checked the information online. The solution is as follows:

(1)You want Youruser Use Yourpwd Connect to the MySQL server from any host.

Grant all privileges on *. * To 'youruser' @ '% 'identified by 'yourpwd' with grant option;

*. * Indicates all databases and tables under mysql. Demo. * indicates all tables under the demo database.

(2)If you want to allow youruser to connect to the MySQL server from a host with the IP address of 77.33.11.22, and use yourpwd as the password

Grant all privileges on *. * To 'youruser' @ '77.33.11.22 'identified by 'yourpwd' with grant option;

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.