PDA

View Full Version : Database Error


Khan_
11-10-2010, 06:48 PM
i just moved from old web host to new webhost and i get database error ..

how can i fix this ?

this is what i get in my technical email as error ..

mysql_connect() [<a href='function.mysql-connect'>function.mysql-connect</a>]: Access denied for user 'champ_admin'@'localhost' (using password: YES)
/home/wrest/public_html/includes/class_core.php on line 312

MySQL Error :
Error Number :
Request Date : Wednesday, November 10th 2010 @ 09:20:25 PM
Error Date : Wednesday, November 10th 2010 @ 09:20:25 PM
Script : http://178.239.49.61/~wrest/
Referrer :
IP Address : 86.25.188.112
Username :
Classname : vB_Database
MySQL Version :

please help .

borbole
11-10-2010, 06:52 PM
Check that the db infos are updated accordingly at the config.php file. If they are, then make sure that the forum db user has got full permissions and access to the db where he is assigned to.

Khan_
11-10-2010, 07:03 PM
DB names are different than config.php file .. can you check for me if possible please.. i am lost .

borbole
11-10-2010, 07:06 PM
DB names are different than config.php file .. can you check for me if possible please.. i am lost .

Well, the database informations at the config.php file should match those of whatever database your forum is residing on. All you have to do is upload the config.php file to your pc, open it with a php editor program, enter the right db infos, save the changes and re-upload it back overwritting the old one and you should be all set.

P.s. Did you move the database to the new host btw? Can you tell us the exact procedure that you followed?

Khan_
11-10-2010, 07:10 PM
i backed up from old host and uploaded the backed up file to new host server .. then they restored it and said that it got errors .. i know it cant be because that back is fine . it must have problem with giving permissions to database ..and after you mentioned i checked config.php and my sql on cpanel .. they both got different names .

borbole
11-10-2010, 07:19 PM
i backed up from old host and uploaded the backed up file to new host server .. then they restored it and said that it got errors .. i know it cant be because that back is fine . it must have problem with giving permissions to database ..and after you mentioned i checked config.php and my sql on cpanel .. they both got different names .

Then update the config.php file with the right db infos as I explained above.

Khan_
11-10-2010, 07:24 PM
the DB name is different and the config.php names are different ..

with that being said .. i dont have to change the names of DB but must change config.php names .. am i correct ..

but if i have to change the config names i want to say you some that these are the names i created 2 years ago and i never changed it .. how come i should change the names now with using the same database . i am new to it, dont take me wrong .

--------------- Added 1289427390 at 1289427390 ---------------

NeverMind .. i did it as you mentioned and now i get new error ..



Warning: fetch_template() calls should be replaced by the vB_Template class. Template name: custom_announcements in [path]/includes/functions.php on line 3957

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/includes/class_bootstrap.php(1261) : eval()'d code on line 8

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/includes/class_bootstrap.php(1261) : eval()'d code on line 32

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/includes/class_bootstrap.php(1261) : eval()'d code on line 36

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/includes/class_bootstrap.php(1261) : eval()'d code on line 41

Fatal error: Call to a member function hide_errors() on a non-object in /home/wrest/public_html/includes/class_bootstrap.php(384) : eval()'d code on line 66


:(

Outbackmark
11-11-2010, 09:49 AM
Change the names in the config.php file, there are 3 DB settings in there that must be correct
DB username
DB password
DBname

The username and dbname will look something like wrest_username and wrest_password

The reason you need to change is now is that the DB name etc has all changed on the new server/host, and your settings in config.php must be changed to match.

As always, keep a copy of the old one on your computer.

Khan_
11-11-2010, 04:06 PM
thats not the issue now mate .. i done that and it is fixed .. its a hook issue + i disabled the hooks and now i get database error ..



Database error in vBulletin 3.8.0:

Invalid SQL:

SELECT forum.forumid, forum.lastpost, forum.lastposter, forum.lastposterid, forum.lastthread, forum.lastthreadid, forum.lasticonid, forum.threadcount, forum.replycount, forum.lastpostid, forum.lastprefixid, user.usergroupid, user.homepage, user.options AS useroptions, IF(userlist.friend = 'yes', 1, 0) AS isfriend

FROM forum AS forum

LEFT JOIN user AS user ON (user.userid = forum.lastposterid)
LEFT JOIN userlist AS userlist ON (userlist.relationid = user.userid AND userlist.type = 'buddy' AND userlist.userid = 0);

MySQL Error : Unknown column 'forum.lastposterid' in 'field list'
Error Number : 1054
Request Date : Thursday, November 11th 2010 @ 06:06:04 AM
Error Date : Thursday, November 11th 2010 @ 06:06:04 AM
Script : http://xx.xx.xx.xx/~xxxx/
Referrer : http://xx.xx.xx.xx/~xxxx/
IP Address : xx.xx.xx.xx
Username : Unregistered
Classname : vB_Database
MySQL Version :



And another thing .. my forum was 4.0.3 and now it is giving error of 3.8.0 .. weird .

i had 3.8.0 almost year and a half ago then i upgraded it to 3.8.2 and then i upgraded to 4.0.3 and stayed on 4.0.3 for almost 8 months now .. and my backup is of 1 month old ... i dont know why it is showing 3.8.0 ..

this is something so wired . please someone help fix this issue.

borbole
11-11-2010, 04:49 PM
It looks like the lastposterid column is missing in the forum table. Maybe something ddin''t go right during the database transfer.

Outbackmark
11-12-2010, 01:15 AM
Borbole is right, you are missing a comumn in the forum table, you can add this in PHPMyadmin. The reason for the error having a 3.8.0 tag on it is because the DB was 1st populated with a 3.8.0 install, its really not too important, but you will need to fix that table.
Once it is fixed you will need to run some maintenance tasks in the admin cp, rebuild thread and post information.
Then run the DB check and repair tool, then run the Unique Indexes fix as well. You need to do this so every thing works correctly.
If you dont know how to use PHPMyAdmin on your DB, get someone who does to fix that table for you!!

Khan_
11-16-2010, 01:13 AM
Borbole is right, you are missing a comumn in the forum table, you can add this in PHPMyadmin. The reason for the error having a 3.8.0 tag on it is because the DB was 1st populated with a 3.8.0 install, its really not too important, but you will need to fix that table.
Once it is fixed you will need to run some maintenance tasks in the admin cp, rebuild thread and post information.
Then run the DB check and repair tool, then run the Unique Indexes fix as well. You need to do this so every thing works correctly.
If you dont know how to use PHPMyAdmin on your DB, get someone who does to fix that table for you!!

what column do i suppose to add ? and how ? ..

btw i tried to restore with an even one month old database and now i get this error ..


Fatal error: Class 'vBulletinHook' not found in /home/wrestli/public_html/forum.php on line 78

KevinL
11-16-2010, 02:29 AM
it sounds more like missing files or the wrong system files were uploaded..

Khan_
11-18-2010, 12:04 PM
i need a solution for it mate .. not intelligence ..