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

XF 1.2 An unexpected database error occurred. Please try again later.

Slind

Active member
#1
Hey,

I moved my Forum from a webspace to a vserver. Database and database accs are the same. Other CMSs working fine.

What could be the issue ?

An unexpected database error occurred. Please try again later.
 

Brogan

XenForo moderator
Staff member
#2
View the page source to see if there is additional information.
This is usually due to incorrect database details in config.php.
 

Slind

Active member
#3
same database and acc as contao and contao is working
why is there a .xf ?

An unexpected database error occurred. Please try again later.
<!-- Mysqli prepare error: Table '46361m36800_10.xf_option' doesn't exist -->

$config['db']['dbname'] = '46361m36800_10';
 

Jeremy

Well-known member
#9
You may want to reach out to your host to help you with some of these server issues that are cropping up, they are the ones who would be able to help you the easiest.
 

Slind

Active member
#14
got apache working again

you are right there are a lot of tables missing.

How do i fix this, if I export them with default settings as bzip it only includes 136 of over 250 tables.
 

Brogan

XenForo moderator
Staff member
#15
Use SSH to dump the DB:
Code:
mysqldump -ucta -p --single-transaction --skip-lock-tables db_name > /path/to/backup/db_name_$(date +%d.%m.%y).sql
Then .zip it:
Code:
tar -czf db_name_$(date +%d.%m.%y).tar.gz /path/to/backup/db_name_$(date +%d.%m.%y).sql
Then copy it to the new server, unzip it and import it.
 

borbole

Well-known member
#20
i used phpmyadmin on the webserver to export it and imported it via phpmyadmin on the vserver
How big is your db? Most server have a file size limit for phpmyadmins on their server so the backup/restore process can get corrupted.

Try another tool like mysqldumper for example. It handles both operations very nicely (backup&restore). The same goes for large files as well.