XF 1.2 Importing vB 4.x to xenForo

Nnirvi

Member
Hi!

I'm trying to import a rather large vBulletin database to xF. I only have the sql dump - for now I have no access to the current vB installation so I can't access its config.php.

I was able to bring the sql to a database on the same server as the xF installation. However, when I try to import the data inside xF, I get the error "The table prefix or database name is not correct."

The db name is correct and unless HeidiSQL hides table prefixes somehow, there are none. Any ideas? Someone mentioned that the error might be result of incomplete db which would suck at this point because importing the dumb to the server took roughly 20 hours.
 
The error seems to indicate that one of those two values is incorrect.

The importer won't start until it can establish a connection so the issue of corruption shouldn't be a factor at that point.
 
Ok. I'm 100% certain that the db name is correct. Can't think of anything else that there is a prefix, it's just not clearly visible on HeidiSQL. Do you have any idea where in the db I could find the prefix?
 
They're all without a prefix: access, action, ad, etc. There are no prefixes in phpMyadmin either. I've also run several checks on the db while being careful not to change anything. I even tried to put a blank space to the prefix field in the importer.
 
And you're sure the database name you're entering is correct?

I don't really know what else to suggest; I've only done a few vB imports and once the criteria were correct it went smoothly.
 
Positive, even though I'm starting to get a blurry vision :)

This must be one of those things where it's something outrageously obvious or just pure voodoo. Are you sure that the db can't be corrupt?
 
Ok. One more thing - if I enter either the username or db name wrong, I get an access denied message. If both are correct, I get the name or prefix incorrect message. Does this indicate anything?
 
Is it possible that I don't have enough priviliges? Both db users (vB and xF) have all the rights to their respective databases but I don't have root access to the server. For example, I can't turn sql logging on.
 
You would likely get a different permission error, though it's possible (particularly if you have permission to the DB but not to run SELECT queries, for example).

The query that is being run is:
Code:
            $db->query('
                SELECT userid
                FROM ' . $config['db']['prefix'] . 'user
                LIMIT 1
            ');
If this fails, it will display that error.
 
Not really. The code in question is in library/XenForo/Importer/vBulletin.php:
Code:
        try
        {
            $db->query('
                SELECT userid
                FROM ' . $config['db']['prefix'] . 'user
                LIMIT 1
            ');
        }
        catch (Zend_Db_Exception $e)
        {
            if ($config['db']['dbname'] === '')
            {
                $errors[] = new XenForo_Phrase('please_enter_database_name');
            }
            else
            {
                $errors[] = new XenForo_Phrase('table_prefix_or_database_name_is_not_correct');
            }
        }
You could try removing the try and the whole catch block (leave the query). That would give the exact error then.
 
The error message is generally correct then unfortunately -- MySQL doesn't see the user table in the pelitdump database. (But the database is presumably known.) There's not a lot more we can recommend from our side. Some element of the MySQL details are incorrect or the restore wasn't done correctly.
 
Because the details are valid and (presumably) the database is valid, but MySQL isn't seeing the "user" table in that database (like if you pointed it to the XF database, which wouldn't have that table, for example).
 
Back
Top Bottom