Hot to connect to remote MySQL server when my ISP is blocking 3306? - mysql

I am developing simple application with Visual Studio that gets data from remote MySQL server through MySql.Data.dll extension. Everything works fine when I'm in my own network, but when I'm at customer site it won't work. I'm assuming their IT is blocking port 3306. Since this is a big corp with strict rules cooperation with network admin is not an option. I heard about tunneling with SSH, tried to do some research but this time this is something not supported by my remote MySQL server provider. I'm out of ideas. What are my options?
Many thanks,
Paw

You can try the command > telnet <yourDBHost> 3306 to verify if port is blocked.
In that case, if you can't request to your admin to open port, maybe you can change the port of MySQL to another open port in the firewall, using your CPanel or editing config files directly if you can access it.

Related

MySQL Remote Connection (Replication)

I have the following topology.
One Ubuntu 16.04. Instance on the Amazon AWS where my global MySQL Server is running. I want to use this Server as a Slave (Multi-Source Replication) for many local Master (Windows Machines MySQL Server).
For Testing Reasons I`ve Managed to make this running on one local Machine (with three different MySQL Server Running).
But now I want to make this Replication work on the mentioned global Server with the local ones. But it fails on the attempt to connect from the EC2 ubuntu Instance to the local Windows MySQL Server.
When I try to connect from my EC2 Instance to the local Computer with MySQL running on Port 3307 it keep saying:
ERROR 2003 (HY000): Can't connect to MySQL server on (113)
The strange Part is, that I can PING the Local Computer but not telnet it.
Telnet just says:
telnet: Unable to connect to remote host: No route to host
I can access the Global (EC2 / Ubuntu MySQL Server) from the local Machine but not the other way around.
I`ve already made a new Rule for this Port on the Windows Firewall Settings.
But the Port 3307 on the IPv4 Address seems to be still Closed.
I have no clue what I am missing to get a Connection from the EC2 Instance to my local Computer via TCP.
Do I have to open the Port Specific on the Router?
I hope for your help.
Best Regards.
It seems like your local computer is not visible, as your incoming ports to your local pc are closed. It may be a problem with your router, or your internet service provider, which is not allowing you to open ports(the most common one).
The possible solutions are:
1.) If your ports are not open due to the router
Try forwarding required ports to your pc.
Try Switching off your NAT firewall that may be blocking ports.
Try switching off your windows or antivirus firewall if any.
2.) If your ports are blocked by your Internet service provider.
Try getting help from ISP
Switch to a static IP connection if on dynamic.
Use a VPN service that provides an unblocked port service to all IPs.(This one solved my problem when I was struck in this situation.)

Unable to access port 3306 for mySQL Workbench

I have enabled this through windows Firewall. (I use Avast Free which doesn't have a free firewall) and I have went onto the BT router to port forward this too. Yet I still get system error 10060. I have downloaded PfPortchecker and checked port 3306 and apparently it's still not open.
I am pretty clueless on what to do here, any help is appreciated cheers.
If both MySQL Workbench and your MySQL server run on the same machine then you don't need to open any port on the modem or in the firewall. Focus on problems on your local machine.
First thing to check is: is your server actually running? Is there a service that starts the MySQL server? What setup is that? Did you install the server via the MySQL Windows Installer? If the server is running check the config file if TCP/IP networking is disabled for some weird reason (it should not, but who knows). If that is disabled you can only connect via a named pipe to your server.
Next step is to check is that the user you use to connect is actually allowed to connect from the local machine. Jeremy is right here, it matters if you use localhost or 127.0.0.1, especially if IPv6 is enabled on the box (where localhost resolves to ::1, instead of 127.0.0.1).

Mysql Connecting remotely

I'm having a problem running a MySQL server that is hosted on another server that isn't the web hosting server. Currently my web server is running on godaddy's free linux hosting. They do offer a MySQL database free, but you can't connect remotely (Sequel Pro OSX program) without paying for an upgraded hosting plan. So temporally, I'm going to host the database on my server at home (XAMPP). Well, whenever I try to connect to the database using the PHP command mysql_connect() I'm getting an error:
"Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server at 'reading initial communication packet', system error: 110"
before it was saying 113 (I believe).
Any-who, I tied to use the 'Bind-address' and changed it from 12.0.0.1 to my LAN IP. it didn't work or I didn't do it right. So, any help I can get on this would be awesome.
FYI, I can connect to the database remotely from inside my network using Sequel Pro. But the godaddy server can't connect. Port is open also, so that's not the problem.
Out of the mouth of a godaddy support guy, "Our shared hosting plans do not give you the ability to connect to an external database. If you wish to have this ability, you would need to look into one of our server hosting options."
So, my configuration is correct, it's just godaddy has it blocked. Lame! Thanks everyone for the help.
If you're hosting your database to a home local machine, you should also redirect router "xxx" TCP port to 3306 TCP port of hosting pc.
Remember you must connect to WAN ip on port "xxx".
You can use free dns services like dyndns to map your internet connection to a name (example yourname.dyndns.org)
Redirect a port (default 3306) of your router to 3306 TC port of your hosting pc (internal)
From remote pc connect to yourname.dydns.org:3306 or to port you redirected on router

Cannot connect to remote mysql from Mac lion

I'm a mac novice and trying to get a developer setup to develop php sites locally. The sites he develops have a mysql backend and that is on a remote box. We got xampp installed and working, he can connect from the website to the local mysql box but he cannot connect to the remote box. He is using the exact same connection info I am using from my windows system. I do not have any issues. Also the mysql server is setup to accept all users (we are currently using root) regardless of hostname.
I searched his system and I could not find a mysql.sock file. I do not know what this does, but googled some articles that mentioned.
Please help if you can.
Try Telnetting to the server from your host and see if you get a response.
telnet host 3306
If that doesn't work, you probably have some local firewall on your mac that is blocking the connection. Also, one thing you don't mention is that you can connect from a windows computer and not a mac... are they on the same network? If they're on different networks or in different places, that could indicate a local network issue.
This is definitely not an issue with mysql, but with something on the Mac itself.
The mysql.sock file is relevant only to the machine the MySQL server is running on, for local clients to communicate with the server. For any remote machines, they'll be connecting via TCP on port 3306.
Make sure that port 3306 is open in the server machine's firewall, and that MySQL has been configured to allow TCP connections.

Manage mySQL DB by using phpMyAdmin and point browser to ip

Hi I am completely new to phpMyAdmin and mySQL
Is there any way to configure remote management/access of my MySQL database by pointing requests or a browser to an IP? I have my server set up behind a router and have setup port forwarding for ports 8080 (tomcat) and 3306(should be default mySQL). Everything works locally on the machine, however I cannot access the dbs or phpmyadmin by pointing a browser from a computer on the local network to http://IP/phpmyadmin or from externally by pointing the browser to the IP given to me by my ISP. Any thoughts? Is there a specific way to edit the config files in order to allow the use of IP addresses?
Exposing your db and appserver on the internet is not a good idea. If these need to be accessed remotely, use a VPN or authenticated SSL. In the case of phpmyadmin - if this is running on a webserver on your network then you'll need to forward port 80 too - although I'd recommend using HTTPS/SSL (port 443)