MyBB Community Forums

Full Version: Downloaded a db
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
My friend recently quit using his site, he gave me his ".sql" database and im trying to import it, i dont know how to use it with a forum though, since all he wanted to give me for some reason is the db.

So how do i use it with a new forum or whatever?
All you really need is the db; do you know what version of MyBB it came from?? You need to import it to a database in phpMyAdmin, but the think we need to know is what version of the MyBB files to use with it so that it works.
either 1.4.5 or 1.4.6
Any help?
That's OK then, upload the 1.4.6 files, then use this code [wiki]Inc/config.php[/wiki] to put into config.php, edit in your database details. CHMOD all the MyBB files that need CHMODing and then once the database is imported with phpMyAdmin, everything should work.
ok let me try.
"SQL query:

-- MyBB Database Backup
-- Generated: 02nd June 2009 at 10:10
-- -------------------------------------
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 " When importing it to phpmyadmin
You'll need to drop the tables from the database that are already there... if there's tables already there though, are you sure that isn't just the same database as the one you're importing...??
(2009-06-04, 10:11 PM)philz Wrote: [ -> ]CREATE TABLE mybb_adminlog (

You will have to edit each table in the database manually in a php editor, changing the above line, for example, into this:
CREATE TABLE IF NOT EXISTS `mybb_adminlog` (

And replace every instance of:
INSERT INTO `mybb_adminlog` .....

into
UPDATE `mybb_adminlog`...

Then you can import the db...

You can use the trial version of "Advanced Search and Replace" software to handle these changes in no time.

You must backup your own db first, otherwise you will lose it for ever.

Regards
Don't install mybb...just upload the files. Install the database and then manually create the config.php...login to admincp and save a setting so that settings.php is written fresh. Make sure to CHMOD the files needed though.

inc/config.php 666
inc/settings.php 666
cache/ 777
uploads/ 777
uploads/avatars/ 777
ok, im going to go ahead and try this.