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)
Related
We're in the process of setting up Tableau connectivity to our company's sales database and so far, the people that have been attempting to connect (they're from some other company) keep getting denied. The errors they're getting are as follows.
Unable to connect to the ODBC Data Source. Check that the necessary drivers are installed and that the connection properties are valid.
Can't connect to MySQL server on '[IP address] (61).'
Unable to connect to the server '[IP address].' Check that the server is running and that you have access privileges to the requested database.
Today we opened ports 3306 and 20560. We were hoping we could set up some kind of port forwarding thing so that they connect to 20560. I'm not sure what we need to do to set that up, however. I was also told that SSH tunneling is an option, but connecting with PuTTY doesn't yield any results.
I'm at a complete loss as to what I need to do to allow them to connect. I'm also not sure that opening port 3306 is safe and I'd like to know if I should have it closed. I randomly picked port 20560 because it's not being used for anything. We don't want just anyone to connect, but I've been told that the IP address connecting to our database may not be static.
i'm trying to connect to a CPanel database on a remote server from my Laptop's SequelPro, it's not working and i have no idea why, i've set the remote access to be the '%' wildcard, so my specific machine shouldn't matter
I'm using the domain name of the site and i've used the correct username and password for a user i created on my CPanel's DB... what am i doing wrong? Or am i overlooking some detail?
It should just login with the domain and user credentials right?
Please ask your hosting providers if they do allow remote mysql connections to their mysql server. Most of the providers don't. You could test that by doing a telnet connection on the mysql server's ip address, portt 3306.
telnet mysql-server-ip 3306
If you can connect then they do allow incoming mysql connections from the internet to their server. If not, then there is nothing you can do. Just write them, explain your problem and see what they say.
Login to cPanel and go to MySQL Databases. Check if there's any remote mysql server shown there. If not, most probably the MySQL runs locally on the cPanel server the mysql server ip = the cPanel server ip. If you go to
cPanel -> Remote MySQL you can add there your ip address or the ip you're connecting to. That might fix your issue...
I'm trying to access a database from the default Linux MySQL client, but all I get is a timeout. It's actually the database used by a WordPress website, and in the configuration file I can see that the IP address of the DB server is actually localhost (127.0.0.1). So I assume that the host name of the DB server is the same as the website's.
I am able to connect to the database with a PHP script that I wrote and uploaded to the server with this same information, and with the show variables query I was able to verify the port number (which was 3306) and specify it to the client. I can see a lot of variables but I'm not sure which one to use.
Any help?
If your Wordpress site is remote, you must connect to DB server like remote connection not local connection. If wordpress and DB server are in the same server, the configuration file to connect with DB is localhost, but if you want connect from remote host you must config your connecto with remote data.
So i have this server (hosting service) known as Parallels power.
Now on this hosting service my database is configured and stored.
Now the database is MySQL and if i go to its administration panel i get the following details:
Server version: 5.5.33
Protocol version: 10
Server: Localhost via UNIX socket
User: root#localhost
Now i want to connect to this database to this database remotely however i am not sure how?
In my paralle control pannel i get a container name for the host server Container ****.unoeuro-server.com However this wasnt the host i can connect to my database at.
So i decided to send them an email to check if i was blocked out and they replied:
****.unoeuro-server.com is not your Host and your firewall is not blocking outside calls.
So my question to you guys how the hell can i connect to the database remotely :S?
If you have privilege in phpMyAdmin to manage users (root privilege), you can create a user with global access to it. so you can access to your panel from desired remote Host.
UPDATE: It seems you have root privilege to manage users in phpMyAdmin, so when you logged in to your phpMyAdmin panel go to User tab then click add user link then fill your information but in host field select any host or your desired host.
Under what scenarios would one want to connect to a host other than localhost? What I mean is when:
mysql_connect('localhost', 'root', 'root');
I provide 'localhost' as the first argument without ever stopping to think what purpose it serves. I guess the opposite would be remote host, but when would you actually use it?
localhost is a hostname that refers to the local machine.
Therefore, you pass that to connect to a server running on the local machine.
If you want to connect to a MySQL server running on a different machine, you would pass that machine's domain name or IP address instead of localhost
.
It depends where the SQL server is living. In an application architecture you could potentially have UI, Services, and SQL living on separate boxes. In this scenario you'd point mysql_connect() to the appropriate machine.
localhost is simply an alias for the computer that you are running the script on. By connecting to localhost, you are connecting to a server on the same computer.
Replacing 'localhost' with an IP or host name allows you to connect to a different computer.