Page 1 of 1

phpBB database

PostPosted: 31. March 2005 07:05
by alexsee
I'd like to backup my phpBB forum/website (commercially hosted) on my home machine. To that end I have downloaded and installed XAMPP followed by the entire forum directory and the associated database. I then extracted the database in the mysql data directory which was ultimately visible from phpmyadmin. However, when I navigate to the forum directory I receive the following error,

phpBB : Critical Error
Could not connect to the database

I've started mysql with the supplied batch file.

config.php lists the currect database as "$dbname = 'phpbb_3';", which is now extracted into a subdirectory with the same name in the data directory.

Suggestions would be most helpful.

Thanks.

PostPosted: 31. March 2005 07:10
by alexsee
I just tried setting-up a new forum with a fresh install of phpbb only to be met with the same errors. I must be doing something fundamentally wrong.

PostPosted: 31. March 2005 17:01
by keepsedge
The database name has to be exactly the same,
The database username has to exist on your machine as well
The password for that user has to be the same one you used while hosted comerialy.

php conects to a dtatbase in the folowing manor

Code: Select all
if ($dbc = mysql_connect ('location', 'username', 'password')) {
    something happens here;

} else {
   message_die ('Eror connecting to the database);
}


where location is usually localhost, and then there is your username and password. if any thing about your mysql database is different from what you had comertialy, its not going to conect. This also incudes the version. If you were using a different type (i.e.. not mysql) hen again you'll have the same problems. You need to mimic the exact circumstances you were under before.

Also make sure you update your DNS stuff too for your domaine or the forums may not operate properly, with broken links and such =(

PostPosted: 31. March 2005 17:28
by taustin
How did you "extracte the database in the mysql data directory"? You cannot just copy the files in the directory.

PostPosted: 31. March 2005 17:30
by keepsedge
phpbb comes with a restore database function that lets yu upload an sql file, i would image he did it that way.. i would hope he did....

backing up the database works the same way.. i would imagine he clicked the backup database link in the phpbb admin CP.

PostPosted: 31. March 2005 21:14
by alexsee
I used the automatic database backup facility on Yahoo then downloaded the tarred and gzipped file to the data directory where it was extracted. I suspect from the above that I may have outstanding issues with user and password information. So, back to the drawing board.

Thanks.

PostPosted: 02. April 2005 20:27
by dmiranda
Actually, I do not think it is your problem. Since you are using xampp (I guess) and assuming you are using the last version, with apache 2.0.53, that may be the problem. If so, switch to 2.0.52 or less, and phpbb2 will likely install and run without any problem. That is my experience, anyway, in localhost.

I wonder what is generating this conflict. Before installing xampp, I had basically the same setup, but with apache 2.0.52, so i reinstall it, and swithc to it when I want to test phpbb2.