MyBB Community Forums

Full Version: Error after change hosting
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have full backup of files and database, then restore to a new server. But finally got this message

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1054 - Unknown column 'f.ufid' in 'on clause'
Query:
SELECT u.*, f.* FROM mybb_users u LEFT JOIN mybb_userfields f ON (f.ufid=u.uid) WHERE u.uid='2338' LIMIT 1

I don't know what to do now.

New and old server both use:
MySQL version 5.1
PHP 5
Can you look in phpMyAdmin and paste here the columns that are in mybb_userfields?
Here it is

[Image: iD6muot.png]

the query run normally through phpMyAdmin

[Image: TvIDplo.png]
Where is the error being generated?
It appears on every page I can access

hxxp://khmt1k2.net
I get another errot on that site:
Quote:MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1054 - Unknown column 'properties' in 'field list'
Query:
SELECT name, tid, properties, stylesheets FROM mybb_themes WHERE def='1' LIMIT 1
Does that column exist in your database too? If yes, make sure your database settings are correct in inc/config.php:
$config['database']['type'] = '';
$config['database']['database'] = '';
$config['database']['table_prefix'] = '';

$config['database']['hostname'] = '';
$config['database']['username'] = '';
$config['database']['password'] = '';

EDIT: also got this on /admin, so yes, most likely wrong database configuration.
Quote:MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1054 - Unknown column 'uid' in 'where clause'
Query:
DELETE FROM mybb_adminsessions WHERE uid = '0'
No. if the config is incorrect it should display

Quote:MyBB SQL Error
MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1045 - Access denied for user '***k21.net'@'localhost' (using password: YES)
Query:
[READ] Unable to connect to MySQL server
most probably database is corrupt - do you have any other recent backup of database to restore & check
(2013-12-03, 05:42 PM)zinki Wrote: [ -> ]No. if the config is incorrect it should display

Oh really? So you're saying entering incorrect settings 1-3 would always give "Access denied" connection errors? Because I don't think so. Try yourself.

Also you can have more than 1 database and connect to the wrong one, you know - then there could be an error like the ones I mentioned. Either that or your db is simply broken.
I'm pretty sure that DBconfig is correct. I can connect normally through phpmyadmin

DBconfig
Quote:$config['database']['type'] = 'mysql';
$config['database']['database'] = 'khmt1k2_net';
$config['database']['table_prefix'] = 'mybb_';

$config['database']['hostname'] = 'localhost';
$config['database']['username'] = '*****';
$config['database']['password'] = '*****';

phpmyadmin
[attachment=30635]