• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 [MAJOR] An unexpected database error occurred. Please try again later.

ncbetz

Formerly Noah Betz
#1
Hello,
I just changed servers, and I created a new database to put it in (changed name, username, and password). I then imported everything. I think XenForo is looking for the old one still. How do I change it?

Thanks,
Noah
 

Brogan

XenForo moderator
Staff member
#5
The error is a database error (one of Zend_Db_Exception types) which should have the error message in the page source.

If it doesn't then you will likely need to contact your sysadmin or host for further troubleshooting and support.
 

ncbetz

Formerly Noah Betz
#6
Code:
<?php

$config['db']['host'] = 'localhost';
$config['db']['port'] = '3306';
$config['db']['username'] = ‘USERNAME’;
$config['db']['password'] = ‘PASSWORD’;
$config['db']['dbname'] = ‘DATABASE NAME’;

$config['superAdmins'] = '1';
This correct?
 

ncbetz

Formerly Noah Betz
#8
Code:
<?php

$config['db']['host'] = “localhost”;
$config['db']['port'] = “3306”;
$config['db']['username'] = “USERNAME”;
$config['db']['password'] = “PASSWORD”;
$config['db']['dbname'] = “DATABASE NAME”;

$config['superAdmins'] = “1”;
So that? I changed the ' to "
 

Brogan

XenForo moderator
Staff member
#9
I recommend downloading Notepad++ and using that to edit php files.

You are still using magic quotes:
Code:
$config['db']['host'] = 'localhost';
 

ncbetz

Formerly Noah Betz
#10
Code:
<?php

$config["db"]["host"] = “localhost”;
$config["db"]["port"] = “3306”;
$config["db"]["username"] = “user”;
$config["db"]["password"] = “pass”;
$config["db"]["dbname"] = “name”;

$config["superAdmins"] = “1”;
@Brogan - I have that now. All ' are now ".
 
Last edited:

ncbetz

Formerly Noah Betz
#13
Code:
<?php

$config["db"]["host"] = "localhost";
$config["db"]["port"] = "3306";
$config["db"]["username"] = "user";
$config["db"]["password"] = "pass";
$config["db"]["dbname"] = "name";

$config["superAdmins"] = "1";
Aha! Fixed, I belive?
 

Chris D

XenForo developer
Staff member
#14
That looks better and your site seems to be up.

For future reference, Atom is a good cross platform text editor. It's developed by GitHub.