News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Data Base Error

Started by Maxie2019, July 06, 2022, 09:28:38 PM

Previous topic - Next topic

Maxie2019

Quote from: Sir Osis of Liver on July 12, 2022, 07:37:55 PMYes, but you should dump the database first if you don't have a recent backup.  Click on the database in left column, you'll see list of tables in right panel, check the checkbox next to log_errors table, scroll to bottom, select drop table from the "With selected" dropmenu.  That should remove damaged table, then you should be able to export the database, or download it with cpanel Backup.  Once you have a good backup, copy the above query into sql tab and "Go", that will execute the query and create a new table.


Found all of that and looks pretty straight forward. With fingers crossed, I'll apply it and let you know how I get on.

Thanks guys!  :)

Maxie2019

Followed the instructions and had the data base backed up - I then copied the above script into the SQL field and received the following error.

Error
SQL query:


DROP TABLE smf_log_errors
MySQL said: Documentation

#1051 - Unknown table 'jeremyba_smf.smf_log_errors'

Maxie2019

Should the script just be coped from 'Create Table'?

Doug Heffernan

Quote from: Maxie2019 on July 13, 2022, 02:31:38 PMFollowed the instructions and had the data base backed up - I then copied the above script into the SQL field and received the following error.

Error
SQL query:


DROP TABLE smf_log_errors
MySQL said: Documentation

#1051 - Unknown table 'jeremyba_smf.smf_log_errors'

It looks like that table does not exist in the database. You should recreate it using the code posted in the previous page by @Oldiesmann.

Maxie2019

Quote from: Doug Heffernan on July 13, 2022, 04:09:12 PM
Quote from: Maxie2019 on July 13, 2022, 02:31:38 PMFollowed the instructions and had the data base backed up - I then copied the above script into the SQL field and received the following error.

Error
SQL query:


DROP TABLE smf_log_errors
MySQL said: Documentation

#1051 - Unknown table 'jeremyba_smf.smf_log_errors'

It looks like that table does not exist in the database. You should recreate it using the code posted in the previous page by @Oldiesmann.

I did - however, the copy and paste starts with 'Drop' - shouldn't I just copy and paste from 'Create'?

Doug Heffernan

Quote from: Maxie2019 on July 13, 2022, 04:13:33 PMI did - however, the copy and paste starts with 'Drop' - shouldn't I just copy and paste from 'Create'?

The DROP TABLE command is not needed if said table does not exist. In that case, you should omit it from the query. i.e. copy/paste the code from Create command line and run it.

Oldiesmann

Quote from: Sir Osis of Liver on July 12, 2022, 07:37:55 PMYes, but you should dump the database first if you don't have a recent backup.  Click on the database in left column, you'll see list of tables in right panel, check the checkbox next to log_errors table, scroll to bottom, select drop table from the "With selected" dropmenu.  That should remove damaged table, then you should be able to export the database, or download it with cpanel Backup.  Once you have a good backup, copy the above query into sql tab and "Go", that will execute the query and create a new table.


As pointed out above, backing up the database will not work if the data file for the log_errors table is missing. However, the code I posted above shouldn't break the database in any way as it just modifies a single table, so it should be perfectly safe.
Michael Eshom
Christian Metal Fans

Maxie2019

All sorted guys, thanks so much for your help!! Consider yourselves all bought a virtual drink   :)

Advertisement: