MyBB Community Forums

Full Version: How to import an existing database?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi

I have done a clean install of MyBB 1.6 on a Centos 6 test system.  I want to import the MyBB database from our live system.  I saved the database on the live system and transferred it to the test system.

On the test system I:

1) Created a database:

> CREATE DATABASE forums;

2) Installed MyBB 1.6 and specified that database

3) Ran phpMyAdmin and imported the saved database.

phpMyAdmin gave this error:

Error

SQL query:

-- MyBB Database Backup
-- Generated: 19th March 2015 at 18:56
-- -------------------------------------
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

I realise that I need to import into an empty database and hoped that that was what I was doing.  Did the act of installing MyBB make it non-empty before I did the import?

Please explain what I have done wrong and how to fix it.

Best regards

David
you have to drop tables in the current database (new) and import the earlier backed up database
(assuming that earlier saved database belongs to same version of MyBB)
(2015-03-21, 01:42 PM).m. Wrote: [ -> ]you have to drop tables in the current database (new) and import the earlier backed up database
(assuming that earlier saved database belongs to same version of MyBB)

Thanks for your help.