XF 1.2 SQL name change and problems

Moshe1010

Well-known member
Hi,

I've changed the username of the entire account on my server (DirectAdmin), and XenForo stopped working with the error (after plugging in the new SQL details):

Code:
An exception occurred: Mysqli prepare error: Table 'xenforovb2_Xenforo.xf_option' doesn't exist in /home/xenforovb2/domains/**/public_html/library/Zend/Db/Statement/Mysqli.php on line 77

Zend_Db_Statement_Mysqli->_prepare() in Zend/Db/Statement.php at line 115
Zend_Db_Statement->__construct() in Zend/Db/Adapter/Mysqli.php at line 381
Zend_Db_Adapter_Mysqli->prepare() in Zend/Db/Adapter/Abstract.php at line 478
Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 825
Zend_Db_Adapter_Abstract->fetchOne() in XenForo/Error.php at line 48
XenForo_Error::unexpectedException() in XenForo/Application.php at line 329
XenForo_Application::handleException()

I get the idea that a table is missing in my SQL, but why would a table delete itself by a database name change without moving the database anywhere outside the server (or even inside the server)?

Thanks.
 
Can you access the site at all? Some servers directly like usernames to database names. So a change in that may cause a change in your DB name unexpectedly (I doubt it, but it's worth looking at). If you access the database via PhpMyAdmin, do you see the table?
 
Can you access the site at all? Some servers directly like usernames to database names. So a change in that may cause a change in your DB name unexpectedly (I doubt it, but it's worth looking at). If you access the database via PhpMyAdmin, do you see the table?
I cannot access my site at all. The error appears on the top of every page you try to access to (including admin.php).
And no, via PhpMyAdmin, I cannot find the table "xf_option".

This is what I did via SSH:
Code:
[root@server ~]# cd /usr/local/directadmin/scripts
[root@server scripts]# ./change_username.sh testing xenforovb2

And then it died.
 
Are the rest of your XenForo tables present? Do you have a database backup you can restore this table from?

I'm not sure what your rename did to cause this tho.
 
Are the rest of your XenForo tables present? Do you have a database backup you can restore this table from?

I'm not sure what your rename did to cause this tho.
I would need to dig deeply in order to find a backup for this Dev account, so I prefer to avoid it.
I'm not sure if the rest of the XF tables are present. They do, but when I click on them, they aren't? Weird:
http://img594.imageshack.us/img594/6803/o8c4.png

I guess everything is gone except search index?
If yes, that's super weird.
 
Last edited:
Indulge me for a minute... In your XenForo config, change your database from xenforovb2 to directadmin (or to whatever you renamed it to).
 
Was the name originally testing_x and you changed it to xenforovb2_x? Try reverting the updates to XenForo config. If that doesn't work, I'll let someone far more knowledgeable with servers help you, since I am out of guesses.
 
That solved the problem, but what the hack is going on here?

That's insane because when I change the SQL name (by a username change), it reduces the DB by half, meaning it deletes EVERY SINGLE TABLE, and leaves just the search index (Elastic Search).

When I've changed the SQL username, the DB reduced to 650MB. Currently, when I changed it back to "testing" username, it came back to 1.3GB.
What's going on here?
 
Hi
I've had exactly the same thing happen or very nearly the same, I am getting the same error messages but when I look in the database that table is there and appears to be complete. This happened after I moved my site to a VPS, in the process my hosting company changed the names of the databases and the username. It went from (username/db name) Savvy_XF/XF to savvyaut_SavvyXF/savvyaut_XF. Just so I am clear on what you did to fix this. I need to revert the name of the database to XF and the username to SavvyXF? That should fix this?

I am confused as well since this error happened after I confirmed that XF was running on the new VPS. I saw the error when I tried to install ArrowChat (not sure if that caused anything or was just coincidental) I was in the middle of the ArrowChat installation and wanted to check something so I launched XF and got the error. I, too, cannot access any page inlcuding the Admin.

I figured I'd post here and see if any new ideas on this. I'm also going to try to do the changes that worked before.
Thanks
 
..and I figured it out. Turns out when they did the move they changed the case of the table names. I found a few that had to be changed from lower to upper case. Once I did that all was good. I suspect there are a few more so I am doing a check of table names from the old database to the new one. What was helpful was that the error message changed to tell me what table names needed to be change. Nice!
:-)
 
Top Bottom