Advance thanks to anyone who can chime in.

I run a popular, though not wildly so, science news site. I have a VPS through the terrific Servint.com.

I'd like to use a low-cost Siteground.com (or comparable) account strictly as a MySQL server for my Drupal installation.

I'm having trouble and I've searched the boards.

Specifically, I don't know how to change settings.php to account for the remote server. The db URL seems like the trick, but I can't seem to get it right.

I've been trying variations on:

$db_url = 'mysql://username:password@localhost/207.58.xxx.xxx/dbname';

but to no avail.

Part 2 of my question is, assuming I did work out that line correctly, and established on the Siteground.com account that it should allow remote access from my web server, is there something else I need to fiddle with?

Comments

vm’s picture

here shouldn't be anything else to fiddle with, however many hosts don't seem to allow remotley accessing their DB server from another server not on their network. Are you sure siteground understands what you are trying to do ?

_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )

nevets’s picture

Assuming siteground actually allows this (not very common) remote mySql database access can be slow unless the server is tuned properly. I kind of doubt a low cost service would meet this criteria.

smazsyr’s picture

Thanks to you both! I'm still game to try this, if nothing else in a test environment.

Any insights on crafting the db URL?

Anyone else have experience with a dedicated MySQL server solution for mid-sized sites (and small-sized budgets)?

vm’s picture

All you would need if what you are doing is even possibly is the DB url, which is no different than any other installation.

DB location
DB user
DB pasword

There is no way around a host disallowing remote DB access though, if that is what you are asking. Disallowing remote connetions is what stops hackers from hacking accounts remotely.

_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )

smazsyr’s picture

Thanks guys.

Any chance you could manually write out a sample db URL that ought to work? I understand each of those components, and have included them in my own failed attempts. But as you'll see above, my URL doesn't work.

vm’s picture

if the url doesn't work the host isn't allowing remote connections.

looking at your address above, I highly doubt if you are trying to connect remotely that you would use "localhost".

Seems to me that if you believe siteground offers this type of feature, they should be able to provide you with the proper information on how to remotely access their servers.

_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )

smazsyr’s picture

I appreciate your persistence VeryMisunderstood. I must say, you're a skeptic all right.

Maybe localhost should be missing from the URL construction: That's just the sort of advice I need. But beyond that I'm afraid your comments haven't pushed me further down the road!

fwiw, Siteground does allow remote access to their databases, and provides the functionality to identify allowed remote domains right in cpanel.

Anyone else ever connect their site to a remote MySQL host and care to supply a sample of the URL they included in settings.php?

vm’s picture

http://forum.siteground.com/archive/index.php/t-417.html may help

_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )

dman’s picture

If you do have remote db access, the db connection url is/would be:

'mysql://username:password@servername/dbname';
$db_url = 'mysql://username:password@207.58.xxx.xxx/dbname';

It's not impossible at all, but is unlikely to be available by default on shared hosts. And may be significantly slow for running a CMS by.

.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/

smazsyr’s picture

My hat's off!