MyBB Community Forums

Full Version: Is it possible to switch from MySQL to PostgreSQL?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Would it be possible to take a MyBB install on MySQL and switch over to PostgreSQL later on? What's the migration process like for anyone whose done this?
There is no issue to switch over to PostgreSQL database engine.
The migration process only needs an export of the current database and the re-import to PostgreSQL. After that make the change to the config file and set the new database type:

./inc/config.php
$config['database']['type'] = 'postgresql';

Be carefull with database encoding (Latin, Unicode, UTF etc.) while exporting and importing.
When you're using UTF-8 at all, there should be no mismatch.

Further ensure the pgsql PHP module is enabled.

[ExiTuS]
I've had some success importing a database from MySQL into Postgres using pgloader before, but I did have to do some manual work afterwards. I've not tried it on a MyBB database before, but we don't use any particularly fancy features so it should work fairly well.
Take care if you're using plugins: most of them (mines first) are developed only for MySQL and some queries can make errors