PDA

View Full Version : Database error


Khan_
02-17-2010, 12:19 PM
first of all apologize for posting in this forum .. i dont know where to look for support and create a topic ..

My webhost moved the server and restored on different server ..and now after moving to new server it gives database error ..site dosent loads and i have no idea what to do .can someone please help me with it .. i dont want to loose my 13k members and everything :( .. please help.

borbole
02-17-2010, 12:38 PM
What is the exact db error you get?

P.s. Check the config.php file and make sure that the db infos in there match those of the db in the new server.

Marco van Herwaarden
02-17-2010, 12:49 PM
Please provide the full database error as given in the pagesource of the error page or in your email.

Khan_
02-17-2010, 01:31 PM
i got error email like over 1500 ... which one should i give out ..

the latest email ..


Invalid SQL:

SELECT
userfield.*, usertextfield.*, user.*, UNIX_TIMESTAMP(passworddate) AS passworddate, user.languageid AS saved_languageid,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid,
language.phrasegroup_global AS phrasegroup_global,
language.phrasegroup_holiday AS phrasegroup_holiday,
language.options AS lang_options,
language.languagecode AS lang_code,
language.charset AS lang_charset,
language.locale AS lang_locale,
language.imagesoverride AS lang_imagesoverride,
language.dateoverride AS lang_dateoverride,
language.timeoverride AS lang_timeoverride,
language.registereddateoverride AS lang_registereddateoverride,
language.calformat1override AS lang_calformat1override,
language.calformat2override AS lang_calformat2override,
language.logdateoverride AS lang_logdateoverride,
language.decimalsep AS lang_decimalsep,
language.thousandsep AS lang_thousandsep

FROM user AS user
LEFT JOIN userfield AS userfield ON (user.userid = userfield.userid)
LEFT JOIN usertextfield AS usertextfield ON (usertextfield.userid = user.userid) LEFT JOIN language AS language ON (language.languageid = IF(user.languageid = 0, 1, user.languageid))

WHERE user.userid = 3186;

MySQL Error : Table 'champ_site.user' doesn't exist
Error Number : 1146
Request Date : Wednesday, February 17th 2010 @ 04:27:09 PM
Error Date : Wednesday, February 17th 2010 @ 04:27:09 PM
Script : http://www.wrestlingconcepts.com/
Referrer :
IP Address : 109.96.188.93
Username :
Classname : vB_Database
MySQL Version :


and another one


Database error in vBulletin 3.8.2:

Invalid SQL:

SELECT *
FROM session
WHERE userid = 0
AND host = '189.187.55.187'
AND idhash = '08c475b42ddc9d99006a9f28c61fb43a'
LIMIT 1;

MySQL Error : Table 'champ_site.session' doesn't exist
Error Number : 1146
Request Date : Wednesday, February 17th 2010 @ 04:28:32 PM
Error Date : Wednesday, February 17th 2010 @ 04:28:32 PM
Script : http://wrestlingconcepts.com/
Referrer : http://www.google.it/search?hl=en&q=wrestling+concepts&btnG=B%FAsqueda+e+Google&meta=
IP Address : 189.187.55.187
Username :
Classname : vB_Database
MySQL Version :


i copy pasted this from my email .. im getting like hundreds of these error emails everytime i refresh my email inbox.

borbole
02-17-2010, 01:49 PM
From the errors you posted it seems as if the restore of the db was not done properly as you are missing some db tables (user and session tables).

Khan_
02-17-2010, 02:13 PM
what do i do now ...

borbole
02-17-2010, 02:23 PM
Tell your host to make a proper restore of the db.

Do you have a backup copy of the db? Try this first, login to the phpmyadmin and check the db tables, if more tables are missing. Then pull them out of the db backup copy (the missing tables) and restore them. That is the easiest and quickest way. That should get your forum back up and running. If the other tables have been restored properly, that is.

Personally, I am surprised that your host did such a messy restore. Any host worth its salt shouldn''t have caused such a problem.

Xencored
02-17-2010, 02:32 PM
Did you do a full restore


Table 'champ_site.session' doesn't exist is missing somekind of addon maybe

Find your Config.php
Edit it after the <?php add

define('DISABLE_HOOKS', true);

save it and see if you can get on your site with addons disabled

Marco van Herwaarden
02-17-2010, 02:44 PM
This is about default tables and has nothing to do with a modification so disabling those will not make a difference.Did you do a full restore


Table 'champ_site.session' doesn't exist is missing somekind of addon maybe

Find your Config.php
Edit it after the <?php add

define('DISABLE_HOOKS', true);

save it and see if you can get on your site with addons disabled

Marco van Herwaarden
02-17-2010, 02:46 PM
To troubleshoot this first use a tool like phpMyAdmin to inspect the database the host created for you.

Are the tables there? If not, then the restore was not successfull and you would need to get back to your host. If still available, compair the database to your old database.

If the tables exist are they maybe using a table-prefix and you have uploaded a fresh config.php without a prefix. If so, set the correct prefix in your config.php.

Xencored
02-17-2010, 02:52 PM
This is about default tables and has nothing to do with a modification so disabling those will not make a difference.

Must be the prefix than Champ.
Add a new config with out the prefix

meh you double posted! and i said the same :D

Khan_
02-17-2010, 03:08 PM
one more error i would like to mention .. instead of using domain name i was using ip to browse my site yesterday because the DNS was not populated since it was moved from one server to another server .. and error is when i put up the ip to browse i get this --> The requested URL /home/champ/public_html/vbseo.php was not found on this server.. i dont even know what this vbseo.php is .. then i went looking for it in files and surprised to see its there .. i mean vbseo.php is there . but the error says vbseo.php not found on this server .. i talked to the ex.administrator of my site who use to take care of site and server management ..he said it might be due to that vbseo .. can this be the problem ?

Xencored
02-17-2010, 03:33 PM
one more error i would like to mention .. instead of using domain name i was using ip to browse my site yesterday because the DNS was not populated since it was moved from one server to another server .. and error is when i put up the ip to browse i get this --> The requested URL /home/champ/public_html/vbseo.php was not found on this server.. i dont even know what this vbseo.php is .. then i went looking for it in files and surprised to see its there .. i mean vbseo.php is there . but the error says vbseo.php not found on this server .. i talked to the ex.administrator of my site who use to take care of site and server management ..he said it might be due to that vbseo .. can this be the problem ?

uploads a new clean .htaccess
i had that error and dont use vbseo yet it was in my .htaccess for some reason
i cleaned it and boom all was working

Khan_
02-17-2010, 04:19 PM
clean .HTaccess ... where can i find it .. i have less info about managing servers ..

Xencored
02-17-2010, 04:53 PM
clean .HTaccess ... where can i find it .. i have less info about managing servers ..

http://httpd.apache.org/docs/1.3/howto/htaccess.html

its in the main root

Edit if you use vbseo there is one in there files jsut reupload it in the root