tags:

views:

67

answers:

10

Is it possible to link to a MySql database that is on another server and hosted somewhere else entirely?

A: 

Yes, as long as a path is provided to you to get "at" the MySql server. In other words, the person hosting the SQL server would have to ensure that a port is open on their firewall so that your application could talk to it.

Michael Todd
A: 

Yes, you can connect to a remote server.

How to Enable Remote Access To MySQL Database Server

Josh Stodola
I failed to see why this needs to be downvoted.
Silence
You might edit/reword your answer, as at first glance it appears to be instructions on how to administer a remote database
Charlie Salts
A: 

yes, however, performance (bandwidth, latency) may be an issue depending on your specific requirements

Robin Day
Agreed. With a connection string example this answer would merit an upvote.
Silence
+1  A: 

yes, just change the host configuration on your connection string

http://www.connectionstrings.com/mysql

Sergio
Great! I have to upgrade Joomla and wanted to do it on another server :)
HollerTrain
A: 

Certainly. The most common production deployment has the database hosted on a seperate server. What might be interesting to you is the connection string that you application defines.

joeslice
+1  A: 

Yes - Check out connection strings http://www.connectionstrings.com/mysql

Prof. Frink
A: 

Yes, it is possible, but it is not wise solution, since your users will experience additional lags when your application will be connecting to some distant database.

smok1
A: 

It is possible if the hosted MySql server has a public IP you can access.

RioTera
+1  A: 

I have to recommend against it if you have a lot a data to transfer via the web, but within the network of company it works. In fact, in a common solution : you put the data on a dedicated server with performance/redundancy capabilites.

When you can connect to a local database you use a connection string such as 127.0.0.1:3306/somthing_something. With that in mind, you realise you can easily change this to another host.

Silence
A: 

I've been trying this for days with a joomla site and can't get it to connect to a remote DB. The db is configured to be accessible from all hosts but given that joomla has a config file that specifies seperately the host, DB name, username and pass (you can't create a connection string manually) I'm not sure what other options I have to get this to work.

Did the orginal poster have success with this?