I have a remote server say 1.2.3.4 where I run a code to connect to MySQL which is on another (third) remote server. Now the piece of code runs perfectly fine from my local machine (It connects to Mysql on the Remote server), and that piece of code runs well from two other different IP addresses also.
But only from 1.2.3.4 server when I try to connect to MySQL it gives this Error:
OperationalError: (2003, "Can't connect to MySQL server on '45.105.149.250' (110)")
What can be the Issue ?
Try telnet to the server port 3306 and see if it goes through.
That will tell you if it's MySQL that has the issue or something else.
Related
I've gone through the basics, bind_address, Google's Firewall, ufw shows inactive but I can't even telnet to the machine on the mysql port.I'm trying to get spotfire to use our db directly just to test it out.
The mysql db is on a vm instance in Google Cloud. The server can of course work with the db no problem, any external connections don't go through with this error:
ERROR 2002 (HY000): Can't connect to MySQL server on '' (119)
Telnet says this:
Connecting To ...Could not open connection to the host, on port 3306: Connect failed
I'm sure I'm missing something, any help will be awesome.
ERROR 2003 (HY000): Can't connect to MySQL server on 'xx.xx.xx.xx.' (60)
I'm getting this error when trying to connect to this server remotely.
I recently hard rebooted my server and I'm guessing I haven't started something I need to.
I'm running Ubuntu 14.10
Mysql is up and running. All the sites that use this db are up and running. I can also log into the server and admin the db. But I prefer using a mysql client (navicat) for admin.
Prior to this reboot I was able to connect to this server remotely (navicat) for administration.
I have the appropriate entries in the mysql.user table (as I've said, I was able to connect remotely at one point)
my.cnf file:
#skip-external-locking
#bind-address = 0.0.0.0
Any clue as to what might be preventing connection
This error tells you that client can not reach the server, not that server is not operational. Maybe the address has changed (dhcp?), or port is blocked...
openshift scaled app with port forward - Unable to access mysql on localhost.
I have a simple php scaled app, I was able to setup the port forwarding for myapp. I can see that the 127.0.0.1:37731 is pointing to the openshift mysql gear.
But when I try to access mysql on command line or using mysql workbench, I am getting a
"Connected to MySQL at 127.0.0.1:37731 with user adminXXXXX", connection parameters are incorrect error.
I am ubuntu. "adminXXXXX:#127.0.0.1:37731:" is the connection string when I copy it from the workbench.
Try specifying the host separately.
E.g. after port forwarding, I entered
mysql --host=127.0.0.1:40793
and got
ERROR 2005 (HY000): Unknown MySQL server host '127.0.0.1:40793'
but this worked:
mysql --host=127.0.0.1 --port=40793
I'm trying to setup a new connection in MySQL Workbench to MySQL server on my other network computer named say: SERVER
Hostname: SERVER
Port:3306
Username and password I leave blank.
I'm getting "unknown server host"
SERVER has dynamic IP.
How do I provide the correct Hostname?
I don't think that you can connect to a computer of your network with its name only in MySQL Workbench.
So, if you can't allocate a fixed IP with DHCP to your computer running MySQL maybe you could use port forwarding in your router config (localhost:port -> computer2_ip:mysql_port) so you will be able to connect to localhost:port in MySQL Workbench. You could also create a tunnel between the two computer but I think this is rather a question for ServerFault.
I'm having a weird problem where I can connect to a certain database server from my local machine (and my friend can also connect to the database server from his local machine) but we can't connect to the database server from his AWS server.
What I get on the AWS server is:
"Can't connect to MySQL server on '<IP address>' ".
It's not as if the database server is only allowing connections from certain IP addresses; it didn't know about my IP address before I tried to connect.
Any idea what could be different about my AWS machine that could be making the connection not work?
Is the MySQL server inside the same network as the local machines? If so, it might explain why local machines can connect but the remote AWS can not.
By default, MySQL disables all remote connections. You can check if the remote connections are enabled. It could also be an issue with port block. MySQL uses port 3306 by default. Either MySQL or the AWS might not be configured to send data through the firewall on port 3306.
Here is a decent article explaining how to open these things up.
http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html