简体   繁体   中英

MySQL: No connection could be made because the target machine actively refused it C#

So I made a program that connects to my MySQL database that is hosted on my PC. Connecting via localhost works, but I want to connect to the database using my external IP, but it just gives me this error.

I have already port-forwarded the ports 80, 443 and 3306 that I have set for the website and database. The ports are also allowed in the firewall so I can't see the problem.

If anyone has any Idea on how to fix this please help.

Thanks.

Most likely you are getting the password wrong in the connection string. Have you set a password?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM