MyBB Community Forums

Full Version: where to configure database name after host switch?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I moved one of my forums to a new host. The new host adds a prefix to both the database name and to database username that I wanted to use.

After installing with a fresh install, I moved all my backup files over to the new host, overwriting the fresh install.

What file do I modify to change the names of the database and database username, so the forum can connect to the new database? I can't get into my acp, so I'm hoping to modify the settings through my ftp/filemanager. I remember when I used phpbb2, there was a "config.php" file that was modified rather easily after a host switch. Is there something similar in mybb?

Also, how do I activate an existing forum backup that I have in my admin/backups folder? Or is this automatic once the database settings are configured properly?
Edit inc/config.php

For your second question: import the back-up again with phpMyAdmin.
thanks... found the config file

problem with the import though.

in phpmyadmin, I hit 'import', then find the backup on my computer, then after a small wait, I get this message:

Quote:Error
SQL query:

-- MyBB Database Backup
-- Generated: 08th March 2008 at 20:47
-- -------------------------------------
CREATE TABLE mybb_adminlog (

uid int( 10 ) unsigned NOT NULL default '0',
dateline bigint( 30 ) NOT NULL default '0',
scriptname varchar( 50 ) NOT NULL default '',
action varchar( 50 ) NOT NULL default '',
querystring varchar( 150 ) NOT NULL default '',
ipaddress varchar( 50 ) NOT NULL default '',
KEY scriptname ( scriptname , action )
) ENGINE = MYISAM DEFAULT CHARSET = latin1;



MySQL said:

#1046 - No database selected

I checked the backup file and it appears to have all the information (coded, jumbled) that belongs on the forum. Even tried a new backup. Tried in plain text and g-zipped. Nothing seems to work to get the backup installed.
anyone? for the last issue?
Well, the error doesn't lie. You have to have selected your MyBB database before you import your database backup, try it again after you select your db.
Since I have only one database at the moment, I didn't even think about having to 'select' it. Thanks for pointing that out.

however, there's a new problem:

"#1050 - Table 'mybb_adminlog' already exists"

any suggestions, anyone?
how do I get it to overwite everything, if that's what I need to do?
Quote:Error
SQL query:

-- MyBB Database Backup
-- Generated: 09th March 2008 at 07:51
-- -------------------------------------
CREATE TABLE mybb_adminlog (

uid int( 10 ) unsigned NOT NULL default '0',
dateline bigint( 30 ) NOT NULL default '0',
scriptname varchar( 50 ) NOT NULL default '',
action varchar( 50 ) NOT NULL default '',
querystring varchar( 150 ) NOT NULL default '',
ipaddress varchar( 50 ) NOT NULL default '',
KEY scriptname ( scriptname , action )
) ENGINE = MYISAM DEFAULT CHARSET = latin1;



MySQL said:

#1050 - Table 'mybb_adminlog' already exists
carformguy Wrote:Since I have only one database at the moment, I didn't even think about having to 'select' it. Thanks for pointing that out.

however, there's a new problem:

"#1050 - Table 'mybb_adminlog' already exists"

any suggestions, anyone?
how do I get it to overwite everything, if that's what I need to do?
Quote:Error
SQL query:

-- MyBB Database Backup
-- Generated: 09th March 2008 at 07:51
-- -------------------------------------
CREATE TABLE mybb_adminlog (

uid int( 10 ) unsigned NOT NULL default '0',
dateline bigint( 30 ) NOT NULL default '0',
scriptname varchar( 50 ) NOT NULL default '',
action varchar( 50 ) NOT NULL default '',
querystring varchar( 150 ) NOT NULL default '',
ipaddress varchar( 50 ) NOT NULL default '',
KEY scriptname ( scriptname , action )
) ENGINE = MYISAM DEFAULT CHARSET = latin1;



MySQL said:

#1050 - Table 'mybb_adminlog' already exists

Drop the tables first from the database and try to import it once again
got it... thanks

now problem number three just arose...

I changed the board url and the cookie domain in the database to the new slightly changed aaddress, but when I goto login, the page goes to the last board url, which is still active (for now)...

I can't log in as an admin to the current board.

what am I forgetting to change? anyone?
It's gotta be another simple fix I'm forgetting about for problem three. Any ideas?
You can access the Admin CP directly by going to

yoursite.com/yourforum/admin