Advertisement:

Author Topic: Importing Database Backup Error  (Read 1173 times)

Offline Yellowrose

  • Jr. Member
  • **
  • Posts: 134
  • Gender: Female
  • A Rose by any other name is a thorn
    • Zoo Admin
Importing Database Backup Error
« on: April 12, 2019, 04:51:00 PM »
Installed 2.0.15 last night and had no issues. went to install the database backup I have it's older from 2014 because site has been offline. now I get this error and would like to know how to fix it. Of course after I get this error the import quits.
« Last Edit: April 12, 2019, 08:04:32 PM by GigaWatt »

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,063
  • Gender: Male
    • Kindred-999 on GitHub
Re: Imprting Database Backup Error
« Reply #1 on: April 12, 2019, 05:06:57 PM »
what version was the backed up database?
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Yellowrose

  • Jr. Member
  • **
  • Posts: 134
  • Gender: Female
  • A Rose by any other name is a thorn
    • Zoo Admin
Re: Imprting Database Backup Error
« Reply #2 on: April 12, 2019, 05:17:27 PM »
I'm not sure where would I look to find it?

this is what appears at the top of the database when opening openoffice using CRLF and read only

-- phpMyAdmin SQL Dump
-- version 4.1.8
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 10, 2014 at 09:43 PM
-- Server version: 5.5.36-cll
-- PHP Version: 5.4.23

Offline Yellowrose

  • Jr. Member
  • **
  • Posts: 134
  • Gender: Female
  • A Rose by any other name is a thorn
    • Zoo Admin
Re: Imprting Database Backup Error
« Reply #3 on: April 12, 2019, 05:25:09 PM »
Just checked the folder the database backup is in and there is an smf upgrade for version 2.0.10 so the board most likely had been upgraded to that version of smf. I kept the sites at least updated as best I could before they went down.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,063
  • Gender: Male
    • Kindred-999 on GitHub
Re: Imprting Database Backup Error
« Reply #4 on: April 12, 2019, 05:30:19 PM »
well, confirm that your database has the attachmentType column in the attachments table?
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Yellowrose

  • Jr. Member
  • **
  • Posts: 134
  • Gender: Female
  • A Rose by any other name is a thorn
    • Zoo Admin
Re: Imprting Database Backup Error
« Reply #5 on: April 12, 2019, 05:34:06 PM »
it does

Offline GigaWatt

  • The Smiley Guy
  • Support Specialist
  • SMF Hero
  • *
  • Posts: 1,946
  • Gender: Male
    • Macedonian electronics forum
Re: Importing Database Backup Error
« Reply #6 on: April 12, 2019, 08:18:14 PM »
Import the backup in an empty database, upload the 2.0.10 large upgrade package in an empty directory, run repair_settings.php in that directory, set everything you need to set (database credentials, paths, etc.), afterwards, you can run upgrade.php. If everything goes without a glitch, see if the forum is working. If it is, upload the large upgrade pack for 2.0.15 (if prompted for file overwrite, do it) and run upgrade.php. If everything goes without a glitch, see if the forum is running. If it is, check your PHP version (you can do this with dropping a phpinfo.php file into your forum's root directory and executing it, the code this file has is pretty simple, you can Google for it ;)). If your PHP version is 5.6, change your PHP version in cPanel to 7.1 (7.2 and 7.3 are still not supported by 2.0.x). Check if the forum is running as it should (log in, out, post something, use a test user, check error log, ect.). If everything seems OK, you're probably good to go :).
"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?"..."

Offline Yellowrose

  • Jr. Member
  • **
  • Posts: 134
  • Gender: Female
  • A Rose by any other name is a thorn
    • Zoo Admin
Re: Importing Database Backup Error
« Reply #7 on: April 12, 2019, 11:38:04 PM »
new problem now.

followed instructions so far to this point. Set directory permissions to 775 and file permissions to 666 and this is what I'm getting. I am so frustrated right now I could blow a gasket.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,800
Re: Importing Database Backup Error
« Reply #8 on: April 12, 2019, 11:43:44 PM »
Permissions should be 755/644.  Is the file there?  What's in it?

Offline Yellowrose

  • Jr. Member
  • **
  • Posts: 134
  • Gender: Female
  • A Rose by any other name is a thorn
    • Zoo Admin
Re: Importing Database Backup Error
« Reply #9 on: April 12, 2019, 11:47:17 PM »
yes at one point on the repair_settings I even set it's permissions to 777 and still getting the same error so I deleted the file shut down everything cleaned all my cache started up ftp again reloaded a fresh repair_settings file set permissions again and still getting the same error it's frustrating me to no end

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,800
Re: Importing Database Backup Error
« Reply #10 on: April 13, 2019, 12:05:07 AM »
Not sure what you're doing, but it's not necessary to run upgrade.php if you're upgrading a 2.0.10 database to 2.0.15, there were no db changes from .10 to .15.  You should be able to connect a clean 2.0.15 install to the db if it actually is at 2.0.10 and undamaged.  You can edit the db settings manually in Settings.php.

Offline Yellowrose

  • Jr. Member
  • **
  • Posts: 134
  • Gender: Female
  • A Rose by any other name is a thorn
    • Zoo Admin
Re: Importing Database Backup Error
« Reply #11 on: April 13, 2019, 12:08:22 AM »
I tried that already the screens attached to the first few posts show the errors I got so I followed Gigawatt's instructions added a fresh empty database imported the backup I have to use uploaded the large 2.0.10 upgrade then her said run repair settings and then I got the error in the last screen posted. I haven't even tried to run upgrade.php yet. for the install need the repair settings first.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,800
Re: Importing Database Backup Error
« Reply #12 on: April 13, 2019, 12:16:07 AM »
If Settings.php is 644 it should be writeable.  777 is not allowed on some servers for security reasons.  You can manually edit any of the settings in the file, but it shouldn't be necessary.  Are you at php 5.6 or 7.1?  Do you have the current version of repair_settings.php?


Offline Yellowrose

  • Jr. Member
  • **
  • Posts: 134
  • Gender: Female
  • A Rose by any other name is a thorn
    • Zoo Admin
Re: Importing Database Backup Error
« Reply #13 on: April 13, 2019, 12:18:36 AM »
I'm not sure that's what I forgot to do was run a phpinfo file.... it;s most likely an older version of 5.6 this site has been offline for 3 years. it was on a .net domain and I'm now using a .org domain. so settings do need to be changed both in the setting file and in the database itself.

Offline Yellowrose

  • Jr. Member
  • **
  • Posts: 134
  • Gender: Female
  • A Rose by any other name is a thorn
    • Zoo Admin
Re: Importing Database Backup Error
« Reply #14 on: April 13, 2019, 12:22:31 AM »
ok the set version was 5.6 it's now set to 7.1 let me see what happens now

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,800
Re: Importing Database Backup Error
« Reply #15 on: April 13, 2019, 12:29:22 AM »
It should work in php 5.6, I have all my forums and test installs running in 5.6.  I helped a forum a month or so ago that had problems with repair_settings because he had an outdated version.  Try the attached.

Offline Yellowrose

  • Jr. Member
  • **
  • Posts: 134
  • Gender: Female
  • A Rose by any other name is a thorn
    • Zoo Admin
Re: Importing Database Backup Error
« Reply #16 on: April 13, 2019, 12:37:04 AM »
I think I see the problem going blind in my old age. the upgrade package doesn't have a settings.php file so there is no file to repair.

so now I'm back to a starting from scratch again and hope I can get this site to see the database. last time I tried it's woulkdn't connect and I tried everything new database new import changing database user and database password still got an error.going to try one more time if it doesn't work I give up

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,800
Re: Importing Database Backup Error
« Reply #17 on: April 13, 2019, 12:41:43 AM »
Is the file there?

That's the difference between the upgrade and install packages, upgrade doesn't include Settings.php so you don't overwrite your settings with an empty file.  Install package contains a scratch Settings.php.  You'll have to run repair_settings twice, once to enter db settings, then again to fix paths.

Offline Yellowrose

  • Jr. Member
  • **
  • Posts: 134
  • Gender: Female
  • A Rose by any other name is a thorn
    • Zoo Admin
Re: Importing Database Backup Error
« Reply #18 on: April 13, 2019, 12:57:28 AM »
Some settings are not being shown because the database connection information is incorrect.
Check your database login details, table prefix and that the database actually contains your SMF tables.

I totally give up this is not working and I have 2 different databases I can use and it fails to connect to either one. I'm just done.

Offline Yellowrose

  • Jr. Member
  • **
  • Posts: 134
  • Gender: Female
  • A Rose by any other name is a thorn
    • Zoo Admin
Re: Importing Database Backup Error
« Reply #19 on: April 13, 2019, 12:58:46 AM »
thanks a bunch for trying to help though I do appreciate it the frustration level is just to high time to walk away for a while and try again in a few days.

Offline Sir Osis of Liver

  • SMF Hero
  • ******
  • Posts: 8,800
Re: Importing Database Backup Error
« Reply #20 on: April 13, 2019, 11:10:56 PM »
If you can pm cpanel access, I'll have a look.

Offline GigaWatt

  • The Smiley Guy
  • Support Specialist
  • SMF Hero
  • *
  • Posts: 1,946
  • Gender: Male
    • Macedonian electronics forum
Re: Importing Database Backup Error
« Reply #21 on: April 14, 2019, 01:19:06 AM »
followed instructions so far to this point. Set directory permissions to 775 and file permissions to 666 and this is what I'm getting. I am so frustrated right now I could blow a gasket.

yes at one point on the repair_settings I even set it's permissions to 777 and still getting the same error...

Some hosts might actually deny access if permissions are not "tight enough".

I think I see the problem going blind in my old age. the upgrade package doesn't have a settings.php file so there is no file to repair.

Oh yeah, forgot about that ::)... told you to put the large upgrade package in a new directory and forgot to tell you to copy Settings.php from a backup in that directory ::). Sorry about that... wasn't intentional :-\.
"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?"..."

Offline Yellowrose

  • Jr. Member
  • **
  • Posts: 134
  • Gender: Female
  • A Rose by any other name is a thorn
    • Zoo Admin
Re: Importing Database Backup Error
« Reply #22 on: April 21, 2019, 01:24:26 AM »
ok doing software upgrades today and got 3 of my sites successfully upgraded so figured I would revisit this to see what I could get done. I had to backup in import each of the database individually that went fine including the attachements database with no errors but when I try to access the site I now get this error. How do I fix it would deleting that attachment type column fix it or screw it up?

Offline Yellowrose

  • Jr. Member
  • **
  • Posts: 134
  • Gender: Female
  • A Rose by any other name is a thorn
    • Zoo Admin
Re: Importing Database Backup Error
« Reply #23 on: April 21, 2019, 03:39:22 AM »
lol getting old huh Gigawatt....I know that feeling been there done that already and I can confirm the mind is the first to go.....lol.....lol....thanks for your help though I did try it. now another error or two hurdle to get over and maybe I can start to enjoy my sites again once all these errors are settled.

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 50,575
Re: Importing Database Backup Error
« Reply #24 on: April 21, 2019, 05:35:07 AM »
that error usually means your database version and the files version are not the same. your database may be SMF 1.1.* and your files are SMF 2.0. you need to upgrade the database to match the files version.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,063
  • Gender: Male
    • Kindred-999 on GitHub
Re: Importing Database Backup Error
« Reply #25 on: April 21, 2019, 09:40:08 AM »
and you do that by running upgrade.php
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Yellowrose

  • Jr. Member
  • **
  • Posts: 134
  • Gender: Female
  • A Rose by any other name is a thorn
    • Zoo Admin
Re: Importing Database Backup Error
« Reply #26 on: April 21, 2019, 09:59:36 AM »
ok so upload the upgrade php and upgrade sql files to server again and run it again

Offline Yellowrose

  • Jr. Member
  • **
  • Posts: 134
  • Gender: Female
  • A Rose by any other name is a thorn
    • Zoo Admin
Re: Importing Database Backup Error
« Reply #27 on: April 21, 2019, 11:21:04 AM »
ok just to clarify what I had done before getting that error....a lot of the above was trying to restore old databases to an install of the newer smf version so of course it hung and gave errors so walked away from it for a few days as I was getting frustrated. Yesterday I started from scratch...went and downloaded from the archives a full install version of 2.0.10. uploaded all the files it installed fine and I got the notice in admin to upgrade the forum but wanted to wait till I had the database backup installed first. well ran the import and it said it went fine 100% complete so checked the site ...only I was member and there were no messages which told me the backup didn't import right so having the database I needed in the list of databases installed from when everything was restored a few weeks ago went and backed up each table individually and the imported them. Went to check the site to make sure messages and members were all showing and got that error so having installed 2.0.10 from a full install package which upgrade package should I use to upgrade the databases I'd like to be sure everything is there before doing the upgrade to 2.0.15 as I am having issues now the the 3 sites I did upgrade yesterday with smf cannot connect to the database errors. so needless to say frustration is setting in again. I have never since first installing smf in 2006 had so many problems with installs and upgrades as I have had this time around.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,063
  • Gender: Male
    • Kindred-999 on GitHub
Re: Importing Database Backup Error
« Reply #28 on: April 21, 2019, 07:38:42 PM »
You can not run 2.0.x code with a 1.1.x database.

If you did the install of 2.0.x -- then you have, essentially, a clean database with no data.
If you then drop all tables and import your 1.1.x database into the same location, then you MUST run upgrade.php (which needs the sql files)
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Yellowrose

  • Jr. Member
  • **
  • Posts: 134
  • Gender: Female
  • A Rose by any other name is a thorn
    • Zoo Admin
Re: Importing Database Backup Error
« Reply #29 on: April 21, 2019, 08:04:49 PM »
well as far as the older vb conversion site, what I did was downloaded the older 1.1.21 full install added it to the server imported the needed database tables and I have the site running fine...I also got the main site running again with 1.1.21.

Which upgrade package should I use next...I guess because these are older versions I am unable to connect to the smf site for news etc so not getting a message on these 2 sites that the forum needs to be upgraded. If need  be I can upgrade to an early version of 2.0 first then go to 2.0.15 from there...at the moments these 2 sites are stable using php 5.6 with smf 1.1.21. My other 3 sites are also doing alright on 5.6 even though they are upgraded to 2.0.15. I don't mind doing the longer route to upgrade these last 2 sites if I know in the end after all the work I am not going to be hampered in progress by these mysql syntax errors that have been popping up.

And before anyone suggests I upgrade straight to 2.0.15 from 1.1.21 I tried that already earlier in the week and kept getting mysql syntax errors. so that's why I'm asking which of the lower 2.0 versions to try going with before the final 2.0.15 upgrade. would rather take it one step at a time rather then trying to skip up 4 steps and then find myself starting from scratch again.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,063
  • Gender: Male
    • Kindred-999 on GitHub
Re: Importing Database Backup Error
« Reply #30 on: April 22, 2019, 03:08:46 PM »
Since you now have two thread open regarding the same question, I am going to lock this one.  Support on your problem can continue in your other thread.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.