MyBB Community Forums

Full Version: Change DB
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello Everyone.... how do I change database? I want to make a copy under a new name, of the board that I created and connect it to a new db, same or different server. Where do i change the db settings? This is before the board is even used: no registered users, no threads.... just forums, subforums, and user/group settings and permissions. Thank you.
You can change the database settings in ./inc/config.php
(2012-02-14, 06:27 PM)obelix Wrote: [ -> ]Hello Everyone.... how do I change database? I want to make a copy under a new name, of the board that I created and connect it to a new db, same or different server. Where do i change the db settings? This is before the board is even used: no registered users, no threads.... just forums, subforums, and user/group settings and permissions. Thank you.
Have a look at the merge system this may help ....

(2012-02-14, 06:40 PM)Nathan Malcolm Wrote: [ -> ]You can change the database settings in ./inc/config.php

Hello Nathan. I did not explain myself very well. I created a board with forums , subforums, edited their permissions and edited all the users/group permissions as well. This board is not in use yet. No users, no threads yet. What i would like to do is to make a copy of that same board under a different folder name and connect it to a new db. How do I do that? I want to avoid having to create the whole board again (forums, sub-forums, etc...) for the new db.

(2012-02-15, 06:31 AM)obelix Wrote: [ -> ]
(2012-02-14, 06:40 PM)Nathan Malcolm Wrote: [ -> ]You can change the database settings in ./inc/config.php

Hello Nathan. I did not explain myself very well. I created a board with forums , subforums, edited their permissions and edited all the users/group permissions as well. This board is not in use yet. No users, no threads yet. What i would like to do is to make a copy of that same board under a different folder name and connect it to a new db. How do I do that? I want to avoid having to create the whole board again (forums, sub-forums, etc...) for the new db.

Why not try the merge system ? if not use phpmyadmin to export the database (all tables) .... example the table called <prefix>_templates holds the templates (all code) and <prefix>_forumpermissons holds the forum permission info ....
Create the new database, import the file you exported earlier into the new database. Copy the directory structure (and files) to the new directory then edit ./inc/config.php
find
$config['database']['type'] = 'type';
$config['database']['database'] = 'database';
$config['database']['table_prefix'] = 'mybb_';

$config['database']['hostname'] = 'host';
$config['database']['username'] = 'user';
$config['database']['password'] = 'password';
then edit the values to suit the new database and/or new host
the database name will change. Host,user,type and password may change but the prefix will remain the same