MyBB Community Forums

Full Version: Is it possible? -> Importing a database backup of an online forum into ...
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Is it possible? -> Importing a database backup of an online forum into MyBB installed on localhost?


I tried via phpMYadmin, but error occurred!
SQL query:
-- MyBB Database Backup
-- Generated: 10th March 2012 at 22:12
-- -------------------------------------
CREATE TABLE `mybb_adminlog` (
`uid` int( 10 ) unsigned NOT NULL DEFAULT '0',
`ipaddress` varchar( 50 ) NOT NULL DEFAULT '',
`dateline` bigint( 30 ) NOT NULL DEFAULT '0',
`module` varchar( 50 ) NOT NULL DEFAULT '',
`action` varchar( 50 ) NOT NULL DEFAULT '',
`data` text NOT NULL ,
KEY `module` ( `module` , `action` )
) ENGINE = MYISAM DEFAULT CHARSET = utf8;

MySQL said: Documentation
#1050 - Table 'mybb_adminlog' already exists 


Find the answer here
That error strikes out sometimes. Do this.

1. DO NOT import db directly into localhost.
2. Instead, create a database first, and then inside it, import all the tables (db).

That should work probably, happened a few times with me.
It is, yes. Just grab the backup and import it over phpMyAdmin or something like it.

Make sure you're importing it to an empty database though. The error you're getting means you're trying to import it to a database that is already populated. Create a new database, select it and then import the backup.
(2012-03-12, 06:18 PM)Fábio Maia Wrote: [ -> ]Create a new database, select it and then import the backup.
crazy4cs Wrote:Instead, create a database first, and then inside it, import all the tables (db)
According to your guide:
1. creating a new DB by (e.g.) phpMyAdmin
2. importing bakup.sql.gz
3. Installing MyBB on localhost
SO, If I create a new db and import db backup -> Imported db will lose during install procedure of MyBB! MyBB replaces(=overwrites) new tables into created db instead of imported backup?!

(2012-03-12, 08:59 PM)HBB Wrote: [ -> ]According to your guide:
1. creating a new DB by (e.g.) phpMyAdmin
2. importing bakup.sql.gz
3. Installing MyBB on localhost
Correct.


(2012-03-12, 08:59 PM)HBB Wrote: [ -> ]SO, If I create a new db and import db backup -> Imported db will lose during install procedure of MyBB! MyBB replaces(=overwrites) new tables into created db instead of imported backup?!
Import the db you want to bring on localhost first. Then, create a new empty db and list/name that db when installing MyBB.

Then after the install, edit the inc/config.php file and replace the new db name with the old populated db that you've imported.
(2012-03-13, 06:11 AM)crazy4cs Wrote: [ -> ]Import the db you want to bring on localhost first. Then, create a new empty db and list/name that db when installing MyBB.
Then after the install, edit the inc/config.php file and replace the new db name with the old populated db that you've imported.
I followed your guidance as:
1. I create a DB (named "atom") and imported the backup
2. I create a new DB (named "atom2") and installed MyBB connected to "atom2".
3 I edited config.php in this way:
From:
$config['database']['database'] = 'atom2';
To:
$config['database']['database'] = 'atom';

Now, This is the error that I got:
MyBB has experienced an internal error and cannot continue.
Error Type:
MyBB Error (42)
Error Message:
Your board has not yet been upgraded. Please do so before attempting to browse it. 

1. what's wrong?
2. should new MyBB installed on localhost be the same as MyBB version of backup?
3. Should admin name of new MyBB installed on localhost be the same as MyBB admin name of backup?
(2012-03-13, 10:37 AM)HBB Wrote: [ -> ]
(2012-03-13, 06:11 AM)crazy4cs Wrote: [ -> ]Import the db you want to bring on localhost first. Then, create a new empty db and list/name that db when installing MyBB.
Then after the install, edit the inc/config.php file and replace the new db name with the old populated db that you've imported.
I followed your guidance as:
1. I create a DB (named "atom") and imported the backup
2. I create a new DB (named "atom2") and installed MyBB connected to "atom2".
3 I edited config.php in this way:
From:
$config['database']['database'] = 'atom2';
To:
$config['database']['database'] = 'atom';

Now, This is the error that I got:
MyBB has experienced an internal error and cannot continue.
Error Type:
MyBB Error (42)
Error Message:
Your board has not yet been upgraded. Please do so before attempting to browse it. 

1. what's wrong?
2. should new MyBB installed on localhost be the same as MyBB version of backup?
3. Should admin name of new MyBB installed on localhost be the same as MyBB admin name of backup?

Thats your problem.

You DO NOT INSTALL MYBB

Here you go let me help you:

Download fresh copy of MyBB from this website.
Unzip it, and Upload the files to your server
DO NOT GO TO YOURSITE.COM/INSTALL
Now go make a new DB <-- DATABASE MUST BE EMPTY! -->
Upload all the content from your backup, with BigDump or PhpMyAdmin
Now go to your MyBB Files
Go to: inc/config.php
Make sure your DB Name / Password / Url all reflect your correct information.

(2012-03-13, 01:23 PM)Projec13 Wrote: [ -> ]Unzip it, and Upload the files to your server
I'm gonna to test mybb on local host using a backup of an onile forum!

Quote:DO NOT GO TO YOURSITE.COM/INSTALL
Now go make a new DB <-- DATABASE MUST BE EMPTY! -->
Upload all the content from your backup, with BigDump or PhpMyAdmin
Now go to your MyBB Files
Go to: inc/config.php
Make sure your DB Name / Password / Url all reflect your correct information.
I followed: 1. Creating a fresh db and importing backup -> 2. Transferring MyBB1.6.6 files to /var/www/mybb (=http://localhost/mybb) -> 3. Renaming config.default.php (which was empty) to config.php and adding db-name & usernam & password (& the other lines from "inc/config.php" of an installed MyBB), while inc/settings.php was still empty -> 4. stating a "lock" file into "install" folder -> 5. Trying for http://localhost/mybb
But, this error again occurred:
Error Type:
    MyBB Error (42)
Error Message:
    Your board has not yet been upgraded. Please do so before attempting to browse it. 

I checked inc/settings.php after opening this url: http://localhost/mybb -> It's included the codes/lines as it is on the online mybb. I chanched sit urls in this way:
I changed from:
$settings['bburl'] = "http://domain.com";
(domain.com is an example)
to:
$settings['bburl'] = "http://localhost/mybb";

I changed from:
$settings['homeurl'] = "http://domain.com/";
to:
$settings['homeurl'] = "http://localhost/mybb/";

I changed from:
$settings['cookiedomain'] = "domain.com";
$settings['cookiepath'] = "/";
to:
$settings['cookiedomain'] = "";
$settings['cookiepath'] = "/mybb/";

Again, that error is permanent, what should I do?
(2012-03-13, 04:13 PM)HBB Wrote: [ -> ]
(2012-03-13, 01:23 PM)Projec13 Wrote: [ -> ]Unzip it, and Upload the files to your server
I'm gonna to test mybb on local host using a backup of an onile forum!

Quote:DO NOT GO TO YOURSITE.COM/INSTALL
Now go make a new DB <-- DATABASE MUST BE EMPTY! -->
Upload all the content from your backup, with BigDump or PhpMyAdmin
Now go to your MyBB Files
Go to: inc/config.php
Make sure your DB Name / Password / Url all reflect your correct information.
I followed: 1. Creating a fresh db and importing backup -> 2. Transferring MyBB1.6.6 files to /var/www/mybb (=http://localhost/mybb) -> 3. Renaming config.default.php (which was empty) to config.php and adding db-name & usernam & password (& the other lines from "inc/config.php" of an installed MyBB), while inc/settings.php was still empty -> 4. stating a "lock" file into "install" folder -> 5. Trying for http://localhost/mybb
But, this error again occurred:
Error Type:
    MyBB Error (42)
Error Message:
    Your board has not yet been upgraded. Please do so before attempting to browse it. 

I checked inc/settings.php after opening this url: http://localhost/mybb -> It's included the codes/lines as it is on the online mybb. I chanched sit urls in this way:
I changed from:
$settings['bburl'] = "http://domain.com";
(domain.com is an example)
to:
$settings['bburl'] = "http://localhost/mybb";

I changed from:
$settings['homeurl'] = "http://domain.com/";
to:
$settings['homeurl'] = "http://localhost/mybb/";

I changed from:
$settings['cookiedomain'] = "domain.com";
$settings['cookiepath'] = "/";
to:
$settings['cookiedomain'] = "";
$settings['cookiepath'] = "/mybb/";

Again, that error is permanent, what should I do?

did you cache to the database ? this is from config.php
/**
 * Data-cache configuration
 *  The data cache is a temporary cache
 *  of the most commonly accessed data in MyBB.
 *  By default, the database is used to store this data.
 *
 *  If you wish to use the file system (cache/ directory), MemCache, xcache, or eAccelerator
 *  you can change the value below to 'files', 'memcache', 'xcache' or 'eaccelerator' from 'db'.
 */

$config['cache_store'] = 'db';
if so it may be reading the cache from the 'online' site (now in the local db) and not the local one ... last time I did this I added the database altered config.php to reflect the local database, and if I remember correctly changed the above to files and cleared the browser cache
1. Did you already installed MyBB on the localhost?

2. Is the MyBB version of your online board and localhost is same?
Pages: 1 2