Jump to content

(Renewed) Upgrade fail: core_anonymous_posts doesn't exist


Go to solution Solved by Peter Bickford,

Recommended Posts

Posted

(Reposting since the problem recurred when attempting to upgrade)

Moving from v4.5.2 to 4.6.7, getting the following error when attempting to upgrade:

SELECT count(*) FROM `core_anonymous_posts`
IPS\Db\Exception: Table 'cbforums.core_anonymous_posts' doesn't exist (1146)
#0 C:\websites\forums.comicbase.com\www\system\Db\Select.php(383): IPS\_Db->preparedQuery()

 

Wonder if something got out of sync after having to do a recent restore from backup of the site -- I had recently upgraded to 4.6.2, but the restore I had to do reverted it to 4.5.2 -- might some data / tables have gotten out of sync? To attempt to reset things to a normal state, I have reverted  the following directories on my machine:

- C:\Program Files\MySQL

- [ProgramData]\MySQL (which held the data directory)

- The web page directory: C:\websites\forums.[myforum].com

Is there either a manual fix to cause the upgrade to create the missing table, or is there another directory involved which I can restore in order to set the install to a normal state so it upgrades normally?

Posted
Jim M
This post was recognized by Jim M!

"Thanks for grabbing the database table schema 👍"

Adriano Faria was awarded the badge 'Helpful' and 1 points.

3 minutes ago, Peter Bickford said:

Is there either a manual fix to cause the upgrade to create the missing table, or is there another directory involved which I can restore in order to set the install to a normal state so it upgrades normally?

You can create the table but I guess other errors will popup:

core_anonymous_posts.sql

Posted

Did you remove all database tables in the database before performing your database restore? Sometimes I have seen some pretty wonky results from not doing this with MySQL. 

You will want to adjust what @Adriano Faria provided for your table prefix but that is the table schema and should allow the upgrade to proceed.

Also, just a note, I edited your post to say v4.5.2 to 4.6.7 🙂 

Posted (edited)

It was a disk image/file restore, so no database prep prior to putting the files back.

It looks like other WP/MySQL schemas were OK, but the CBforums one got wonky in the restore (opening it with MySQL Workbench gives "Tables could not be fetched" / "Table 'cbforums.core_anonmous_posts' doesn't exist. ) Unfortunately, while I can see it in the tables list, trying to drop it fails ('doesn't exist'), as does Create Table --ironically because it doesn't exist!

Error Code: 1146. Table 'cbforums.core_anonymous_posts' doesn't exist

 

Is there any sort of MySQL "Validate schema and/or copy only real tables" action that can be taken to try to unscramble things? (unfortunately, DUMP is failing, claiming numerous tables don't exist).

 

The only consolation is that the affected tables seem to apply only to the new achievements in 3.6 -- as long as I don't mind having a basically unstable DB structure and never upgrade, it all still runs (ugh!)

 

-Pete

           
Edited by Peter Bickford
  • Solution
Posted (edited)

Ok, chalk this one up to my MySQL learning curve (I come from SQL Server/SQLite--the file storage structure of MySQL/InnoDB is really foreign to me).

Your advice to clear databases before restoring was right on point--I just didn't understand that in MySQL world, that didn't mean firing up the database engine, disassocating the objects from the database store, then shutting the works all down again [as you'd do in SQL Server or the like]). Instead, it just meant delete all pre-existing .idb files from the data store folder before restoring the file backup! (Thumps head against desk)

Since I wasn't clearing files (and I was simultaneously assuming that my backup program was restoring folders to their same state instead of leaving existing files while copying/replacing old ones in the directory), I was on a slippery slope toward database schema corruption hell. As soon as I deleted the appropriate data folders, then restored (telling Acronis [my backup program] to restore original privileges) all was well.

Thanks for your help, guys--sometimes when you're this new to an environment, it takes a while to get your bearings!

-Pete

Edited by Peter Bickford
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...