So, I need to let a Visual Basic application connect to my XAMPP MySQL server. I set up the .Net/SQL Connectors, XAMPP, and all that other good stuff. When I try to connect to the server using (my static IP) it will work. When I try to connect to it using (Which is what I believe I need to do, so I can distribute the program...) it says the server is unavailable. So, I'm assuming I have to portforward something? I portforwarded 80 so you can see the webpages at , but do I have to portforward something else to allow remote mysql connections? Also, i tried adding the bind thing to the my.ini file, that didn't work.

Dani AI

Generated

Quick follow-up and a concise checklist based on 's report and ' fix.

A few common gotchas to check when making an XAMPP MySQL server reachable from the Internet:

  • Make sure you edited the correct MySQL config file (XAMPP: use the Config link next to MySQL in the XAMPP Control Panel — that opens the my.ini used by the running server) and restart MySQL after any change. A frequent reason “bind” edits don’t take is editing the wrong file or not restarting the service.
  • Ensure MySQL is allowed to bind to external interfaces (example configuration). Also make sure any skip-networking line is commented out:
# in xampp\mysql\bin\my.ini
bind-address = 0.0.0.0
# skip-networking
  • Create a dedicated, remote-capable DB user (avoid using root) and grant only the needed privileges. Example:
CREATE USER 'appuser'@'%' IDENTIFIED BY 'StrongP@ss';
GRANT SELECT,INSERT,UPDATE ON mydb.* TO 'appuser'@'%';
FLUSH PRIVILEGES;
  • Open/forward the MySQL listening port on the router and allow the MySQL server in the host OS firewall (or restrict the firewall rule to specific source IPs for better security).
  • Don’t test only from inside the same LAN — many home routers block “hairpin” (NAT loopback). Test from a true external client (cellular data or another network).
  • For production or wider distribution, avoid exposing the DB directly: prefer an application server/API, use VPN/SSH tunnels, enable TLS for MySQL, restrict allowed hosts in grants, and monitor access.

These steps cover the usual remaining blockers after the port-forwarding that suggested and explain why an edit to my.ini might initially appear to “not work.”

Recommended Answers

All 2 Replies

MySql default port is 3306, so forward that too (unless you changed it in the setup).

Worked, thanks :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.