0

Is that possible to connect mysql database between servers. I mean, lets say i have 2 accounts on 2 different hosting service, one of them has database, and i want to connect it from other one with php.

When i try it, i get "Warning: mysql_connect() [function.mysql-connect]: Lost connection to MySQL server during query..."

my database is located on godaddy and i set it external access enabled.

Edit: I see it is possible but my host only allows connection via software;

"To use Direct Database Access to connect remotely to your shared hosting database, you need to download software that lets you connect to the database and manage it."

1
  • 1
    Should "work" but aside from some possible intermittent connection issues like you seem to describe, you should typically expect a significant loss of performance when accessing a remote server on the internet. Commented Nov 9, 2009 at 1:41

1 Answer 1

2

It's very possible.

Make sure the host that has your database allows for external connections and allows that username/password combination to access the database (Usually something set via mySQL's GRANT option)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.