1
cybersensei
DBHost as a local network resource vice LOCALHOST

Does anyone know the syntax for assigning the DBHost in mainfile.php to look at another server on the local network?

I tried adding the computer name, but it returned the following error:

Error [Xoops]: Unable to connect to database in file ...\class\database\databasefactory.php line 34

TIA!

2
JMorris
Re: DBHost as a local network resource vice LOCALHOST
  • 2004/11/15 15:01

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


Did you use the NetBIOS name or a Fully qualified domain name (FQDN)?

I'm pretty sure you have to either use a FQDN or at least a static IP.

3
cybersensei
Re: DBHost as a local network resource vice LOCALHOST

I used the NETBIOS name. I'll give the static IP a try.

4
cybersensei
Re: DBHost as a local network resource vice LOCALHOST

The static IP didn't work either.

Any other ideas?

5
JMorris
Re: DBHost as a local network resource vice LOCALHOST
  • 2004/11/15 15:15

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


What is the syntax you are using? Are you adding http:// before the IP?

Should look like:
Quote:
define('XOOPS_DB_HOST', '127.0.0.1');


Just replace 127.0.0.1 with the IP of your DB server.

6
cybersensei
Re: DBHost as a local network resource vice LOCALHOST

I replaced it with:

Quote:

define('XOOPS_DB_HOST', '131.xx.xx.xx');


Obviously I didn't use the x's based on the network.

7
ackbarr
Re: DBHost as a local network resource vice LOCALHOST

also you need to update the security mechanisms in the MySQL server to allow connections from the XOOPS db username from the XOOPS site's ip address.

8
cybersensei
Re: DBHost as a local network resource vice LOCALHOST

I have the username and password set. The site works when I run on the localhost with the database server, but not when I transitioned it to the production server.

When I changed the mainfile.php on the production server to look at our development server hosting the sql database, it returned the error.

So, I changed the mainfile.php on the development to look at the computername and received the same error.

We're using MySQL Administrator and I don't see any settings for establishing the site ip address. Where should it be?

9
cybersensei
Re: DBHost as a local network resource vice LOCALHOST

Okay. It works now. I had to go into the MySQL DB and the user database and add the host. Unfortunately, I had to install MySqlCC to do it as I was unable to edit the table data in MySqlAdministrator.

Thanks for the help all.

Login

Who's Online

308 user(s) are online (268 user(s) are browsing Support Forums)


Members: 0


Guests: 308


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits