1
Jashka
Problem moving Xoops site to new server
  • 2004/1/1 19:25

  • Jashka

  • Just popping in

  • Posts: 5

  • Since: 2004/1/1 1


Hi all! First of all: Happy New Year!

Now, I hope you can help me with this:

I have been working on setting up a XOOPS site, including changing templates, adding forums and downloads etc. This all went fine.
Now, I want to move the site to its own server.

Problem: I now can't connect to the database.
Error: Warning [PHP]: Access denied for user ... Using password: YES) in file class/database/mysqldatabase.php line 74) (twice) and
Error [Xoops]: Unable to connect to database in file class/database/databasefactory.php line 34.

I have moved following these steps:
- ZIPped my entire site and unzipped it on the new server
- updated mainfile.php to match new directories and database name/user name/password etc.
- created DB and imported the DB dump from the old site.

I can perfectly connect to the database via PHPmyAdmin, but when opening the site, XOOPS gives me above errors.

What can I do about this? Because I fear for losing my template changes when running a 'standard' installation on the new server.

Regards,
Jashka

2
Herko
Re: Problem moving Xoops site to new server
  • 2004/1/1 19:30

  • Herko

  • XOOPS is my life!

  • Posts: 4238

  • Since: 2002/2/4 1


ALl I can think of, is make ABSOLUTELY sure that te info in your mainfile is correct (db server, db name, db username, db password, db prefix).

Herko

3
Jashka
Re: Problem moving Xoops site to new server
  • 2004/1/1 22:43

  • Jashka

  • Just popping in

  • Posts: 5

  • Since: 2004/1/1 1


Is it possible that XOOPS deals a bit different with MySQL users that have usernames with non-alphabetical characters?

I can't test it here, as I need to ask my ISP to change my MySQL username, but the current username includes a '-'. Could that be a problem to the XOOPS engine?

Rgs,
Jashka

4
Jashka
Re: Problem moving Xoops site to new server
  • 2004/1/1 23:35

  • Jashka

  • Just popping in

  • Posts: 5

  • Since: 2004/1/1 1


I found it!

In my case, the problem of not being able to login to the DB after moving the entire site + importing the DB to a new server, is caused by the following:

I recalled that the MySQL installed on my ISPs virtual servers (or maybe all MySQL installations) does not accept a '-' as part of the db username.
As I could not change the MySQL username myself, I just changed the following line in mainfile.php:

define('XOOPS_DB_USER', '');

So I actually do no longer specify a username to use.
This works for me.

I thought I just post it here, so that other people might benefit from it aswell.

Regards,
Jashka

5
DonXoop
Re: Problem moving Xoops site to new server

Are you saying you don't have a db user and it works? Do you specify the password?

Only way that is going to work (assuming they don't have a wide open server) is that you are using the same user name for the db that is your username for the hosting. MySQL client defaults to the user making the query (your hosting account in this case).

I don't like using the same names but for hosting sites you have limited choices.

6
Jashka
Re: Problem moving Xoops site to new server
  • 2004/1/6 18:28

  • Jashka

  • Just popping in

  • Posts: 5

  • Since: 2004/1/1 1


Hi,
The DB name and user (account-)name are not the same.
I do use the password though.

It might be possible that they check on the owner of the application that uses the DB. Also, MySQL and the DB appear to be on the same server as my account, because for server I only need to use 'localhost'.

Rgs,
Jashka

7
DonXoop
Re: Problem moving Xoops site to new server

The db user name must be the same as your hosting account name for that to work. The server will default to the user name that made the SQL query. That tells us a lot about how they set-up the account You can test by passing that user name in phpAdmin or something.

If you have characters in the name that XOOPS doesn't like (sanitizer) then that would be a problem. Luckily your account and db name are the same and can let it use the default.

Login

Who's Online

958 user(s) are online (159 user(s) are browsing Support Forums)


Members: 0


Guests: 958


more...

Donat-O-Meter

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

Latest GitHub Commits