Prob. change of Database Address
  • 2007/2/6 17:40

  • cotros

  • Just popping in

  • Posts: 11

  • Since: 2007/1/23

my hosting company changed their servers and as a result changed the my Database Address. Now i can not connect to the database any more ...

"This page cannot be displayed due to an internal error.

You can provide the following information to the administrators of this site to help them solve the problem:

Error: Unable to connect to database"

What i do now? any clues?

Re: Prob. change of Database Address

You will need to check the path to your database in your mainfile.php - start with this FAQ but there are probably more. Since your host made the changes maybe they will assist. There are these things to check:

DB connection failure:

1) Wrong server location
2) Wrong Username Password
3) Wrong Database
4) User given has no access rights to that DB
5) Invalid password scheme being used for database access

So its a simple 5 check situation... If it still fails, you have something wrong....
IE Firewall blocking access to the MySQL service or MySQL extension not enabled (PHP5), MySQL Service not running.

Re: Prob. change of Database Address
  • 2007/2/6 19:07

  • carnuke

  • Home away from home

  • Posts: 1955

  • Since: 2003/11/5

To connect to a database you need to specify the username and password plus the database name.

Providing the physical URL and virtual address of the site is correct all should work ok

1- the address looks ok, because you get a message saying 'the page your accessing is outside of the XOOPS physical path' Or something like that.

Next access phpmyadmin and check your database is there with the correct name.

Has the host changed your admin login password or username? if so this needs to be updated MANUALLY in the mainfile.php

check these lines 70-84 and change 'example' if required:


// Database Hostname
// Hostname of the database server. If you are unsure, 'localhost' works in most cases.
define('XOOPS_DB_HOST', 'example');

// Database Username
// Your database user account on the host
define('XOOPS_DB_USER', 'example');

// Database Password
// Password for your database user account
define('XOOPS_DB_PASS', 'example');

// Database Name
// The name of database on the host. The installer will attempt to create the database if not exist
define('XOOPS_DB_NAME', 'example');
hhttp://houseofstrauss.co.uk Resource for alternative health and holistic lifestyle
search xoops

Re: Prob. change of Database Address
  • 2007/2/6 20:06

  • cotros

  • Just popping in

  • Posts: 11

  • Since: 2007/1/23

Thanks Guys for the help

Host changed the database host name...i changed it in the mainfile.php and it looks to be working fine for the moment.



Who's Online

237 user(s) are online (170 user(s) are browsing Support Forums)

Members: 0

Guests: 237



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

Latest GitHub Commits