Mysql-JAVA desktop program remote connection to the database failed

Source: Internet
Author: User
Running programs on the local machine can connect to the database, and the database uses mySQL. Put the program on a machine that does not have mySQL installed. After my test, I found that the ip address is correct, because when I run the program on the local machine, setting the ip address as the ip address of this network can be connected, and using localhost can also be connected. On other hosts, I use the local ip address, but cannot connect to it. Many people say that mySQL cannot be remotely by default. So I opened Port 3306 on the local firewall and set mySQL User permissions. as a result, I still cannot connect to the database on other hosts. For more information, see the figure .! [Image] (img. ask. csdn. ne... mysqljava

Running programs on the local machine can connect to the database, and the database uses mySQL. Put the program on a machine that does not have mySQL installed. After my test, I found that the ip address is correct, because when I run the program on the local machine, setting the ip address as the ip address of this network can be connected, and using localhost can also be connected. On other hosts, I use the local ip address, but cannot connect to it. Many people say that mySQL cannot be remotely by default. So I opened Port 3306 on the local firewall and set mySQL User permissions. as a result, I still cannot connect to the database on other hosts. For more information, see the figure.

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.