Database oversize for host

Started by Valkrider, April 24, 2023, 10:46:01 AM

Previous topic - Next topic

Valkrider

I have inherited a forum still running v1.1.?

The host limits database size to 2gB. No notification from them about approaching this size and then they lock the database so the forum in unavailable. They have unlocked it so I can access using phpmyadmin. Having read the warning about deleting posts in the tables etc I left well alone.

I did however find that they had renamed all the tables to backup_smf_...... rather than smf_....

I also found tables from a phpBB forum in the same database (presumably an old forum from before my time). I therefore dropped all these phpBB tables to free up some space.

I edited the Settings.php file to reflect the new table names.

Now when I try to access the forum I get the following error message Unknown column 'a.attachment_type' in 'field list'

When I can get this up and running again I will move to smf v2.x.

Any suggestions as to how I can get this up and running again? I did do a backup locally of the database before making any changes.


Doug Heffernan

Quote from: Valkrider on April 24, 2023, 10:46:01 AMI did however find that they had renamed all the tables to backup_smf_...... rather than smf_....

That prefix is usally added by the upgrader when the option to make a backup of the database table has been selected.

Quote from: Valkrider on April 24, 2023, 10:46:01 AMNow when I try to access the forum I get the following error message Unknown column 'a.attachment_type' in 'field list'

Most likely, the database does not match the forum files. The files must have been overwritten with those from a different version, but the upgrader hasn't been run yet. Can you check the version for the files and the smfVersion in the settings table and see whey they are at?


Valkrider

Thanks for the quick reply the version is 1.1 according to the comments at the top of the settings file.

Doug Heffernan

Quote from: Valkrider on April 24, 2023, 11:23:14 AMThanks for the quick reply the version is 1.1 according to the comments at the top of the settings file.

Can you check the version at the index.php file as well as the value of the smfVersion in the settings table?

Valkrider

index.php reports v2.0.18 whereas in the table it is v1.1.12 :(

Sir Osis of Liver

Quote from: Valkrider on April 24, 2023, 10:46:01 AMI did however find that they had renamed all the tables to backup_smf_...... rather than smf_....

I edited the Settings.php file to reflect the new table names.


The forum may have been upgraded to 2.0, so you're connecting to the 1.1 db by directing Settings.php to the backup tables.  That being the case, you have to restore $db_prefix to smf_.  Backup tables may have put db over limit.  Dump the db, then drop the backup tables.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Doug Heffernan

Quote from: Valkrider on April 24, 2023, 12:25:45 PMindex.php reports v2.0.18 whereas in the table it is v1.1.12 :(

Just as I suspected. You checked the settings table with the backup_smf_ prefix, right? What about the settings table with the smf_ prefix, what is the smfVersion value set at? And do you get any errors when entering the smf_ prefix in the Settings.php file? Because it was not very clear to me.

Anyways, if you are going to use the tables with the backup_smf_ prefix, you will have to run the upgrader to bring the database up to date with the forum files. Better yet, since you are upgrading, you can upgrade directly to smf 2.1.3.

Valkrider

Thanks for all your help.

Now I have deleted the old phpBB files the tables in phpmyadmin are now showing smf_ tables and also backup_smf tables. It seems to have taken some time for the database server to get itself sorted, given the lock placed on it by the host, and to display all the tables.

Undoing my edit of the settings.php file has restored the forum. ;D ;D ;D

To regain more space in the database can I delete the backup_smf tables?

Doug Heffernan

Quote from: Valkrider on April 24, 2023, 01:59:56 PMTo regain more space in the database can I delete the backup_smf tables?

If you are not using those tables anymore and you are sure that the upgrade has been finished successfully, then yes you can safely delete them.

Valkrider

Thanks very much, now to read up on updating the smf version.

Doug Heffernan

Quote from: Valkrider on April 24, 2023, 02:06:35 PMThanks very much, now to read up on updating the smf version.

No problem. Please see the following on how to upgrade your smf forum.

Upgrading SMF

I will be marking this topic as solved in the meantime.

Advertisement: