PHP Bulletin Board Home
News About Home
Features of phpBB Test drive phpBB Downloads Support for phpBB The phpBB Community Styles for customising phpBB 3rd party modifications to phpBB

Support Home | Knowledge Base Home | Submit Article | Search Articles | Browse Articles
 postgreSQL to mySQL - migration 
Description: Quick and dirty way to migrate from postgreSQL to mySQL (might work the other way too)
Author: svupp
Date: Sun Nov 27, 2005 9:10 pm
Type: HowTo
Keywords: migrate, mySQL, postgreSQL
Category: Installing/upgrading/converting
After a week of "trying this and trying that" to move from postgreSQL to mySQL I finally got results... And the solution was just hair-draggingly simple...

Short version: Use phpBB install to create the mySQL database - backup data trough phpBB admin panel - insert data into mySQL database - clean up....

Long version:

First on the old forum (the postgreSQL one)
* Log in to the admin panel
* Disable the forum to avoid new posts while you hack away
* Do a "Data Only" backup
* Open the file you just created and remove the first comment lines.

Then:
* Do the phpBB install on a new board/database in a new dir (don't overwrite your old board) - this time on your mySQL database. See that it comes up as it should. Keep the config.php file - delete the new phpBB install again, but make shure you keep your new config.php file. This is basically to create all the necesarry tables etc. in the mySQL database.

* Copy over the old forum directory to a new one on the server (Ex: "cp -R phpBB2 phpBB_new"). This is just a precaution so you can roll back to the old if something goes wrong. Copy in the new config.php to the new directory.

* put the data backup you did earlier on the server
* on the server run "mysql -D newbase -u myuser -p"
* type "\. phpbb_db_backup.sql" (or whatever you called the backup)
* let the insert into commands run their course - this ran flawlesly for me.

* Start up your new phpBB instance and log in - there WILL be some faults in the setup, fer instance your first category and the forum will have the wrong name etc., but that is easilly fixed in the admin panel. Other setup like "forum name" and "allow html" etc. will also need to be set up again, but that is a 5 minute job....

Did not take notes as I went along, but I do think this is correct, and hopefully understandable.

Sincerely
S.

Username: Password:
News | Features | Demo | Downloads | Support | Community | Styles | Mods | Links | Merchandise | About | Home
 © Copyright 2002 The phpBB Group.