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

Slind

Active member
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
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
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';
 

Brogan

XenForo moderator
Staff member
At least one of the tables is missing, possibly more.
Confirm in phpMyAdmin that the DB is viable.
 

Jeremy

Well-known member
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.
 

Jeremy

Well-known member
Virtual server or not, unless you have the physical server in your house, you have a host that should be able to help.
 

Slind

Active member
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
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
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.
 
Top