Log in

View Full Version : Database Error


Virtualshiner
03-14-2008, 03:32 PM
Hi
I tried to get onto my site today and I got a database error.
This is the email I get:

Database error in vBulletin 3.7.0 Beta 6:

Invalid SQL:

SELECT
post.*, post.username AS postusername, post.ipaddress AS ip, IF(post.visible = 2, 1, 0) AS isdeleted,
user.*, userfield.*, usertextfield.*,
icon.title as icontitle, icon.iconpath,
avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar, customavatar.dateline AS avatardateline,customavatar.width AS avwidth,customavatar.height AS avheight,


editlog.userid AS edit_userid, editlog.username AS edit_username, editlog.dateline AS edit_dateline,
editlog.reason AS edit_reason, editlog.hashistory,
postparsed.pagetext_html, postparsed.hasimages,
sigparsed.signatureparsed, sigparsed.hasimages AS sighasimages,
sigpic.userid AS sigpic, sigpic.dateline AS sigpicdateline, sigpic.width AS sigpicwidth, sigpic.height AS sigpicheight,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, infractiongroupid
, '' AS field6, '' AS field7

FROM post AS post
LEFT JOIN user AS user ON(user.userid = post.userid)
LEFT JOIN userfield AS userfield ON(userfield.userid = user.userid)
LEFT JOIN usertextfield AS usertextfield ON(usertextfield.userid = user.userid)
LEFT JOIN icon AS icon ON(icon.iconid = post.iconid)
LEFT JOIN avatar AS avatar ON(avatar.avatarid = user.avatarid) LEFT JOIN customavatar AS customavatar ON(customavatar.userid = user.userid)


LEFT JOIN editlog AS editlog ON(editlog.postid = post.postid)
LEFT JOIN postparsed AS postparsed ON(postparsed.postid = post.postid AND postparsed.styleid = 1 AND postparsed.languageid = 1)
LEFT JOIN sigparsed AS sigparsed ON(sigparsed.userid = user.userid AND sigparsed.styleid = 1 AND sigparsed.languageid = 1)
LEFT JOIN sigpic AS sigpic ON(sigpic.userid = post.userid)

WHERE post.postid IN (0,178,179,181,183,184,191,199,202,215,224)
ORDER BY post.dateline;

MySQL Error : Table 'disneyma_vb.user' doesn't exist
Error Number : 1146
Date : Friday, March 14th 2008 @ 12:41:11 PM
Script : http://disneymagiconline.com/vbulletin/showthread.php?t=46
Referrer :
IP Address : 74.6.19.134
Username : Unregistered
Classname : vB_Database
MySQL Version :

Any help?

Opserty
03-14-2008, 03:40 PM
Have you (un)installed a modification recently?

Virtualshiner
03-14-2008, 03:51 PM
Sorry, I updated the code.
That was an old error.

Opserty
03-14-2008, 03:54 PM
MySQL Error : Table 'disneyma_vb.user' doesn't exist

Your user table doesn't exist. Are you using a prefix for your tables or anything? Have you made any changes to your board or database recently?

Virtualshiner
03-14-2008, 03:55 PM
The only thing that has happened is the board moved servers. It is with the same host etc

Opserty
03-14-2008, 04:28 PM
Have you checked the the database (and table) exist? (Via. your hosting Control Panel)

Virtualshiner
03-14-2008, 04:33 PM
Yep
I can see disneyma_vb

Lynne
03-14-2008, 04:55 PM
And can you see the user table?

Have you tried to run repair/optimize on the table?

Virtualshiner
03-14-2008, 05:34 PM
I dont know what you mean

I cant access anything on my site and I have looked to repair/optimize the table but I dont know where that is.

Edit: In the cPanel, I clicked Repair db but the error is still there.

Lynne
03-14-2008, 05:49 PM
If you are in cPanel and using phpMyAdmin, can you see the user table?

Also, sometimes you need to repair the table more than once.

Virtualshiner
03-14-2008, 05:51 PM
Nope
There isnt a table just called 'user'

snakes1100
03-14-2008, 06:53 PM
Re-import your db.

Lynne
03-14-2008, 07:14 PM
Let me get this straight.... the forum was working fine, and then you got moved to another server and the forum has never worked on this new server - correct? And, now you have looked in the database and you are missing the 'user' table. If this is correct, then the whole database was not moved over to the new server. They will have to reimport the database that they should have backed up prior to the server move.

(Do you have any backups of your database?)

Virtualshiner
03-14-2008, 08:12 PM
Thats right yeah.
Im gonna try to speak to someone at their customer support now and see what they will do.

I didnt take a backup no, I am trying to find a mod that can do that every week at a certain time so havent no.

I will see what they say.

Thanks guys for your support

Skierpetros
03-14-2008, 08:22 PM
if it is a modification error please do the followings to fix it

To troubleshoot this, first reupload all the original vB non-image files (except install.php). Make sure you upload these in ASCII format and overwrite the ones on the server. Also be sure to upload the admincp files to whichever directory you have set in your config.php file. Then run 'Suspect File Versions' in Diagnostics to make sure you have all the original files for your version and that none show 'File does not contain expected contents':

Admin CP -> Maintenance -> Diagnostics -> Suspect File Versions

[Note: In some cases you may also need to remove any of the listed .xml files in the includes/xml directory.]

Next, disable all plugins.

Note: To temporarily disable the plugin system, edit config.php and add this line right under <?php

define('DISABLE_HOOKS', true);

Lynne
03-14-2008, 10:13 PM
Thats right yeah.
Im gonna try to speak to someone at their customer support now and see what they will do.

I didnt take a backup no, I am trying to find a mod that can do that every week at a certain time so havent no.

I will see what they say.

Thanks guys for your support
I believe you can use this to backup your database on a weekly basis: https://vborg.vbsupport.ru/showthread.php?t=126925 There are other modifications also.

Dismounted
03-15-2008, 06:20 AM
The only reliable method of backing up and restoring a database is with shell access via telnet or ssh. This is because backing up with a PHP script like that in the Admin CP or phpMyAdmin can result in PHP timeout errors and an incomplete backup file. Please see the instructions here:

Backup:
http://www.vbulletin.com/docs/html/maintenance_ssh_backup

Restore:
http://www.vbulletin.com/docs/html/maintenance_ssh_restore

P.S. If you don't have shell access, some people have also reported success with these scripts:

MySQLDumper:
http://www.mysqldumper.de/en/index.php

MySQLHotxcopy:
http://www.vbulletin.com/forum/showthread.php?t=134821&highlight=mysqlhotcopy

Bigdump:
http://www.ozerov.de/bigdump.php

Virtualshiner
03-15-2008, 07:43 AM
Many thanks to all of you for your help.
I will be going to speak to customer service real soon.

Thanks again

VS