News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Database errors after upgrade problem

Started by Grant, June 18, 2018, 10:39:49 PM

Previous topic - Next topic

Grant

Hi all,
I've just had my site moved to a new server as they were running PhP version 5.3 on it and I couldn't install much / upgrade at all. That migration seemed to go well and I went into my SQL databases and re-saved the current MySQL password I had (as the MySQL version had increased from 5.5 to 5.6 on the new server). All looked good and worked. I went to softaculous and did a backup and then upgraded to the new version through there. It made no difference to my admin version on the actual SMF site. Therefore, I upgraded through there too. After the upgrade I got the error "Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later."

Hmm. So, I went back into softaculous and restored my backup for this smf site. Now I get the error "Table 'clint5_smf1.smf_settings' doesn't exist" (obviously, clint5_smf1 is my database). I had a look at the database through phpMyAdmin, and it does seem to have a lot of tables missing. Can anyone help? I seem to be stumped. (BTW, forum here: http://www.clintools.com/forums)

Many thanks,
Grant

vbgamer45

Was the backup complete? Do you see a settings table .sql file? I would look for topics too.
If you do a backup from smf sometimes it is incomplete. I recommend phpmyadmin or other database tools
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Sir Osis of Liver

Do you still have access to the database on old server?  Who is your host (I'm afraid to ask)?
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

GigaWatt

Quote from: vbgamer45 on June 18, 2018, 10:42:58 PM
I recommend phpmyadmin or other database tools

And encapsulating that dump in a zip file. For some reason, phpMyAdmin doesn't always make a full dump either. I guess this mostly depends on the host's server settings, but if you "tell" it to do a zip backup, it has to fetch the whole database, zip it, and then serve the file as a download. That's what I always do, I leave all of the dumping settings to their defaults, except the compression setting, I always set it to zip and I've never had problems if I do the backup this way.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Kindred

in general, we recommend never using "autoinstallers".
We have no control over (and no insight into) what they might or might not do....

the proper process for moving a site are here
https://wiki.simplemachines.org/smf/Hosting_-_How_do_I_move_my_SMF_forum_to_a_different_host

proper instructions for upgrading
https://wiki.simplemachines.org/smf/Upgrading

and for backup and restore
https://wiki.simplemachines.org/smf/Backup
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Grant

So sorry for the delay in replying (had marking to do - I work at a University) - and thank you all.

Yes, it's all very odd. I still have the old smf.xxx._.xxx.tar.gz file (a forum backup - not just a sql backup) and am downloading a copy right now to my local machine - 187MB (Edit: no sql database in there!). However, I was paranoid and had also (thank goodness) made an sql backup to my desktop - its a 506KB backup called "clint5_smf1-complete_2018-06-16.sql". I take it this is good news? I can't see what's in it on my local machine. Where shall I put it on the server (if you you think that is a good idea).

The migration was from one server to another, but with the same company. The server I was on was not going to have php upgraded for some reason which was never explained (was still on 5.3). The host is ... Lunarpages (good or bad Sir Osis?).

So, should I put this local sql backup somewhere on the server, overwriting the old one?

Many thanks,
Grant

Kindred

There are two parts to the forum
The files and the database. You need both.

Files get uploaded to the site via ftp or file manager
Databae gets uploaded and imported via phpmyadmin or Cpanel import.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

GigaWatt

Quote from: Grant on June 21, 2018, 02:11:34 AM
However, I was paranoid and had also (thank goodness) made an sql backup to my desktop - its a 506KB backup called "clint5_smf1-complete_2018-06-16.sql". I take it this is good news?

Hmmm... this doesn't look good... a 506KB SQL dump ???. Was it a fresh (newly installed) forum? Because if it was, this might explain why the database is smaller than 1MB. In any other scenario, this would be an incomplete database backup. For example, my forum contains 115000 posts. The uncompressed database (raw SQL dump, as in your case) is roughly 120MB. Compressed in a zip archive, it's 20MB.

The database is the content of the forum. It holds all of the posts, messages, settings, etc. On the other hand, all of the attachments are stored as files in your webspace (where the forum resides, in the "attachments" directory). So, you'd need a full backup of both (your webspace and your database) to say "OK, I've got a backup of my forum".

Read my previous post on how to backup the database from phpMyAdmin and use the zip compression method.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Sir Osis of Liver

Lunarpages is not a graeat host, but I don't recall moving anyone off them.  How did you make the .sql backup?  It's about the same size as one of my 2.0.15 test installs (5 members, 63 posts), and you're apparently missing tables, so the dump is probably trashed.  You can ask LP support if they can provide a backup.


Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Grant

Thank you guys! Yes, the 506KB SQL dump had everything! It's mainly a forum where I answer questions about some stats software I made, so there's not many posts and members (except that time I was targetted by spam because my registration hurdles were too low). I did as Kindred and GigaWatt suggested - restoring through phpMyAdmin and the forums are now nicely back in place! That's the last time I use 3rd party backups - just glad I also did a proper backup through phpMyAdmin!
Thumbs-up!
Grant

GigaWatt

Great to hear ;).

Marking as solved.

EDIT: Someone else marked it before me :P :D.
"This is really a generic concept about human thinking - when faced with large tasks we're naturally inclined to try to break them down into a bunch of smaller tasks that together make up the whole."

"A 500 error loosely translates to the webserver saying, "WTF?"..."

Grant


Advertisement: