cannot connect mysql server remote [closed] - mysql

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I cannot conect to Mysql server remotely, access granted to user from any host and mysql server is running. I can access locally using 127.0.0.1 but when I try to connect using machine's IP it gives me error "Can't connect to MySQL server on '192.168.1.102 (10060)'". I searched a lot couldn't sort this problem.

You shoudh check foll steps
MySQL is listening on public IP (sounds like you've done)
MySQL is listening on standard port / you're connecting the same port it's listening to.
Is there a firewall running on the remote machine? (They usually are packaged standard in distros) Is the firewall configured to allow connections to that port?
If the remote machine is within another network, is there network address translation (NAT) going on between your connection and the end machine - if so, is it configured to allow the MySQL port through.
Is the my.cnf file configured to allow connections from anything other than localhost 127.0.0.1 IPs - although you'd more likely get a access denied response, than a cannot connect.

please check your mysql config file, disable
bind-address = 127.0.0.1

first ping the server ip, if reply you can try this :
reconfigure mysql server instance , allow connect from remote machines

Related

Unable to connect to MYSQL on a remote computer

I am working on windows and having a remote desktop connection of another machine. I am trying to connect to the mysql running on the remote machine through my MySql workbench, installed on my machine.
When I specify the details to connect to mysql i.e.
IP- a.b.c.d
port-3306
username=root
password=
But everytime it shows me an error saying-
Your connection attempt to connect to user='root'failed from your host to server at a.b.c.d:3306
Is it possible that I can connect to mysql on a different machine?
Certainly that is possible, mysql is a network transparent service. However obviously the normal access authorization rules apply.
do you have network access to the mysql port, this might be blocked by a firewall. You can check that by using telnet ip-address-of-server 3306. Does the server answer or do you get a timeout or are blocked? (the answer would look cryptic, soomething like 5.5.33-MariaDB[*[n7p~g!�iXccI$r9``Y{$mysql_native_password or similar )
the mysql server can be configured to not listen to remote connections. This can add security to the setup, but would obviously block any remote connection attempts. You will have to check the configuration files of mysql for that.
mysql itself implements an authorization level. So check if that 'root' user actually is allowed to connect from the outside. Those authorizations are stored in the internal "mysql" database.
Also it is not clear from the question what your network topology is: is the mysql server running on that system you have a "remote connection" to? Is the mysql-workbench running on that remote system or on your local system? This might affect the ip address you have to use inside the workbench.

Connection to MySQL on server via ODBC [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 9 years ago.
Improve this question
I'm writing a desktop application (in Delphi). I would like to connect to MySQL database on a server. Up till now I tested my application using MySQL installed on my local computer. I used ODBC connector and all tests went successfully. Problems have started when I tried to connect database on server via ODBC. I'm getting connection failed message all the time and I cannot do anything.
Please tell me, how should I connect to this MySQL?
By default, mysql listens for incoming connections on port 3306. Use can use telnet to test if a networking problem or firewall is preventing you from connecting to the server that MySQL is running on, using the following command:
telnet fqdn.of.mysqlserver.com 3306
If successful, you should see that it connects, followed by some encrypted gibberish from MySQL. If it doesn't connect, then the problem is a firewall, a networking problem, the MySQL server is unreachable, or something else blocking the connection.

trying to access to mysql remotely

Im trying to gain access to a mysql database hosted by one site from another website.
In short I am in the middle of transferring from one host to another of my website.
I have imported my database from host A to host B, and also uploaded my website.
Host B is now up and running but I want to keep Host A going for a while until people move over to the new host.
So I want host A to use the db on host B.
I have turned on remote mysql on host B and added the shared ip address of my website of host a. This I believe should allow host a to connect to the db on host B.
I have changed the connection details in my php script to the user,db,password details of the db on host b.
But i'm getting a connection error of cannot connect to db.
I have added my home ip address, created an odbc connection on my pc and used access to connect to the db on host b, with success so I know that host is accepting connections remotely.
I have also tried adding the web address of the my site on host A to the remote mysql, and tried using a open wildcard of '%' hoping that would let any remote connection, but still no look.
Is it possible that host a has blocks on connecting to external mysql databases or am i missing something simple?
Help would be appreciated.
Check that your firewall is allowing connections through on port 3306.
Check the MySQL configuration parameter bind-address in my.cnf to ensure that it is allowing remote connections.
There's information and troubleshooting tips here:
http://dev.mysql.com/doc/refman/5.1/en/can-not-connect-to-server.html
I hope this post helps you to debug this issue
Can't Connect to MySQL Server on IPAddress (10061)

Connect to Mysql database from client using Mysql Connector [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I want to make connection between my database on the server,that located on the internet and my application that runs on some client.
My application based on .Net framework and i using MySql Connector for .Net component.
After some searches i gain the server address for the server by execute php command below :
echo $_SERVER['SERVER_ADDR'];
And this command returns : 67.225.166.81
I can connect to database with php when the php files runs on the server.
I used the values for connection in my .Net win app and this is the connection string :
string connStr = "server=67.225.166.81;port=3306;database=navayeme_joomfa;user id=navayeme;password=*****;";
The win app trying to make connection and an exception thrown :
Authentication to host '67.225.166.81' for user 'navayeme#myclientIP' failed ...
The myclientIP is ip of my client.
How can i fix this problem?Is possible the server doesn't support for this type of connection?
Using MySQL database together with a php script run on the same server does not mean that you can connect to the MySQL database from another network. PHP runs without a problem because it can make connection to the MySQL server on server using either
regular TCP connection (locally)
UNIX socket files
Please check that MySQL accepts connections on port 3306. If firewall is used, please make sure that 3306 is allowed for incoming connection.

SQL Server connection string question [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 13 years ago.
Improve this question
I'm trying to connect to a named SQL instance on the server.
There is already default instance of SQL Server 2005 and a newly named one - SQL Server 2008. I'm using the "Network library" property to use TCP connection but for some reason, he try's to connect the default instance and omit an error about login error.
If I remove the network library propery the connection established as well without any error.
I'm using windows authntication and have all the permissions needed.
The problematic connection string:
Data Source=ServerName\InstanceName,1433;network library=dbmssocn;Initial Catalog=MyDataBaseName;Integrated security=SSPI
The working connection string:
Data Source=ServerName\InstanceName;Initial Catalog=MyDataBaseName;Integrated security=SSPI
Omitting the ,1433;network library=dbmssocn from the connection string makes the difference. adding it maked the server to connect the deafult instance.
Both of the server allows remote connections.
I would like to understand why, please.
Thanks in advance,
Tamir
Copied from my answer on your question on ServerFault...
The connection strings have 2 differences so I'll try to answer for this...
Named instances do not listen on port 1433 (only the default instance by, er, default)
The instance name is ignored when the port is specified
So:
ServerName\InstanceName,1433 means connect to server "ServerName" on port 1433
ServerName\InstanceName means connect to server "ServerName" and resolve instance name to correct port (resolve uses port 1434 UDP)
However, network library=dbmssocn means use tcp. It could be the SQL Server instance (see port stuff) does not listen on tcp
At a guess the 2005 and 2008 instances would be listening on different ports. Perhaps you need to set the connection string for the SQL Server 2008 instance to the correct port; you could be hitting the SQL Server 2005 listener and asking it for an instance that is not present on the 2005 installation.
What port is the SQL Server 2008 instance listening on - This article discusses the subject. and has a powershell script that actually interrogates the system to find out what port the DBMS is really listening on. It also talks a little about where this config lives in the registry.