1
DakST
Problem with db connection
  • 2009/3/12 17:03

  • DakST

  • Just popping in

  • Posts: 27

  • Since: 2007/4/16


What is need to change in mainfile.php and others files when change db from example mydb.site.co.yu to mydb.site.rs?

When i try to load page :

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

Sorry - my bad English :)


2
Catzwolf
Re: Problem with db connection
  • 2009/3/12 17:10

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Just change the following and nothing else:

define( 'XOOPS_DB_HOST', 'localhost' ); //Normally just leave this as is, unless specified by your server provider
define( 'XOOPS_DB_USER', 'change the database user if different' );
define( 'XOOPS_DB_PASS', 'Change the password of the database if different' );
define( 'XOOPS_DB_NAME', 'Change the name of the database if different' );

And nothing else needs to be changed

Catz

3
DakST
Re: Problem with db connection
  • 2009/3/12 17:28

  • DakST

  • Just popping in

  • Posts: 27

  • Since: 2007/4/16


Thanks for fast answer, i change this in mainfile.php ( only define( 'XOOPS_DB_HOST', is different ) bat noting is happened, maybe is problem with server i don't know.A try with technical support - hosting support.

4
showcase17
Re: Problem with db connection
  • 2009/3/12 22:03

  • showcase17

  • Not too shy to talk

  • Posts: 190

  • Since: 2005/1/6 0


I assume you copied the database onto your new site?

I know stupid question...
- To Explore and Discover -

5
Anonymous
Re: Problem with db connection
  • 2009/3/12 22:42

  • Anonymous

  • Posts: 0

  • Since:


Did you have to create a new database user/password? If so, does the new user have access to the database?

6
DakST
Re: Problem with db connection
  • 2009/3/13 7:46

  • DakST

  • Just popping in

  • Posts: 27

  • Since: 2007/4/16


My hosting company change from mydb.site.co.yu to mydb.site.rs db host maybe because co.yu not in use more and now for Serbia use .rs

7
ghia
Re: Problem with db connection
  • 2009/3/13 9:56

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


Did you try to reach the database with phpMyAdmin?
I assume your site's domain is stayed the same and only your database, which is on a second server, did change names?

8
DakST
Re: Problem with db connection
  • 2009/3/13 13:24

  • DakST

  • Just popping in

  • Posts: 27

  • Since: 2007/4/16


problem is solving, i try everything, clean templates_c folder and erase mainfile.php and again upload and now working but with many broken links (co.yu) for pictures and some files :(

Tanks of lot for your support
and sorry for my bad English :)

9
ghia
Re: Problem with db connection
  • 2009/3/13 14:42

  • ghia

  • Community Support Member

  • Posts: 4953

  • Since: 2008/7/3 1


If these links and pictures are part of the content as in News articles or forum posts, then you have to edit these.
It should also be possible in MySQL with phpMyAdmin eg:
UPDATE xoops_bbex_posts_text 
SET post_text 
REPLACE(post_text,'site.co.yu','site.rs') ;


10
DakST
Re: Problem with db connection
  • 2009/3/13 17:26

  • DakST

  • Just popping in

  • Posts: 27

  • Since: 2007/4/16


Thanks ghia i will try

Login

Who's Online

183 user(s) are online (118 user(s) are browsing Support Forums)


Members: 0


Guests: 183


more...

Donat-O-Meter

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

Latest GitHub Commits