Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Hosting the DB on another root server


Guest

Recommended Posts

Posted

Hey guys, I want to host my database on another server than my webserver is.

 

THis is a snippet of the configure.php:

 

// define our database connection

define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers

 

What should I put instead of "localhost" ?

I tried to put in the IP Adress of my other server, but it didn't work (unable to connect)

 

I tried to make it work like this:

http://123.168.9.87

and like this

http://123.168.9.87:PORT

 

it didn't work.

 

How can I do this?

Posted

Dominik,

 

Depending on your database host you may or may not have remote access to databases. You will have to check with them. While you're talking to them, if it is possible, get the proper access information.

 

 

 

Chris

Posted

Hey guys, I want to host my database on another server than my webserver is.

 

THis is a snippet of the configure.php:

 

// define our database connection

define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers

 

What should I put instead of "localhost" ?

I tried to put in the IP Adress of my other server, but it didn't work (unable to connect)

 

I tried to make it work like this:

http://123.168.9.87

and like this

http://123.168.9.87:PORT

 

it didn't work.

 

How can I do this?

In addition to what Chris said, the setting should just be the IP.

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Posted

I host the root server myself, but I don't know how to enable the remote access.

Maybe you can help me?

Could it be the case that the mysql server is configured that way that it will allow only connections from localhost?

 

So the setting should be the IP without the http:// ???

Posted

Dominik,

 

 

In most cases the DB_SERVER for remote access would appear something like this:

 

 

define('DB_SERVER', 'yourdatabase.db.600006.hostdomainname.com');

 

 

Just defining the IP is not enough to connect to the database.

 

 

 

 

Chris

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...