help I'm desperate! can't restore a deleted forum.

Started by Mareid, January 29, 2011, 09:03:32 AM

Previous topic - Next topic

Mareid

I made a backup of the forum database using the smf backup facility.  I also made a backup of all the files in the /forum directory.  All files were then wiped from the server and the original smf sql database was deleted.  I restored the database, then uploaded all the other files.  I was unable to connect to the database.  Then I started an upgrade.  The first time I ran upgrade.php, I got the message that the db password and username were incorrect in Settings.php.  So I went in and directly edited them on the server.  I then ran upgrade.php a second time, and this is the message I'm getting:

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/rfamily/public_html/forum/upgrade.php on line 840

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/rfamily/public_html/forum/upgrade.php on line 842
No database selected

I am assuming it's because when I did the restore of the database, somehow it didn't reconnect to the front end files.  I'm desperate to get this back running again.  Can you help?


JBlaze

@OP, if you wouldn't mind, copy/paste your Settings.php into a PM and send it to me. Make sure it's in code tags please :)

Also, send me your database information as well. It appears that for some reason, it's not selecting the correct database, although it is logging in fine.
Jason Clemons
Former Team Member 2009 - 2012

Mareid

should have mentioned that I used repair_settings.php and I get the following message:

Some settings are not being shown because the MySQL connection information is incorrect.

also maintenance mode is "value not found" and when I set it (using repair_settings) It does not save.

JBlaze

Quote from: mareid on January 29, 2011, 09:18:22 AM
should have mentioned that I used repair_settings.php and I get the following message:

Some settings are not being shown because the MySQL connection information is incorrect.

also maintenance mode is "value not found" and when I set it (using repair_settings) It does not save.
Looks like you may need to ask your host what your correct MySQL information is then.
Jason Clemons
Former Team Member 2009 - 2012

Mareid

I pm'd the settings.php file.  The odd thing is I brought this upon myself.  Here is the complete sequence from yesterday to today:

created backup of db using smf backup facility
downloaded all files from /forum
created another backup of db using my host's backup facility
wiped all files from the server
restored db using myadmin and the smf backup
tried to use webconnect to upgrade, got an error
uploaded small upgrade package, got it working except for attachments
******
here is where the problem starts
I wanted to see if I could get the attachments to re-attach so:
******
knowing I had a full backup, I deleted the db, and all the files
restored the backup db from the smf .sql.gz backup
restored the files including attachments
didn't work
tried the upgrade
didn't work
deleted db again
restored from the server version of the db (got one error, sql reports (some field) cannot be null) but otherwise the tables look fine
didn't work
tried the upgrade
didn't work.
ran repair_settings
tried to connect, didn't work
tried the upgrade, got the error shown above.

Mareid

#6
I deleted the db one more time and am restoring it from the smf backup again this time.  No errors in the upload but when I try to access the forum I get the following message:


Connection Problems
Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.

Is there some way I can check the connection so that I can go back to my host and complain...because if I tell them smf is not working they will blame it on smf and not on something in their system.


Mareid

check the connection using something other than smf that is...

Mareid

don't know if this means anything but I ran a connection test
<?php $link mysql_connect('localhost','mydbusername','mydbpassword'); if (!$link) { die('Could not connect to MySQL: ' mysql_error()); } echo 'Connection OK'mysql_close($link); ?>

and it worked.  However repair_settings.php is still giving me an error message as shown above and I can't get to the forum from the web.  I have contacted the host but so far (surprise surprise) no response.

Mareid

Ok they don't call me a semi-newb for nothing.  Talk about your boneheaded errors:

I didn't realize that not only do you have to create a user, you have to CONNECT THE USER TO THE DATABASE!!!!

what an idiot I am and I apologize for all the hard work people went to to help me when it was a stupid mistake of my own.

Advertisement: