How to repair database error messages!

Started by mortymoose, January 19, 2011, 02:15:16 PM

Previous topic - Next topic

mortymoose

Good Evening all....

I have been receiving about 40 emails telling me that the could not connect to smf database error, I am not a techie with this stuff, but using phpmyAdmin i went to the database and did a check and the following Error (see attachment) came up, er...uhm.... could somebody out there tell me what I need to do to repair these errors, I tried the drop down menu that says repair, but it keeps telling me to input a missing field.....

Thanks for reading this post....


kat

Have you tried going to Admin>Forum maintenance and "Repairing errors"?

CPanel>Databases>MySQLDtabases and repairing, there?

LiroyvH

In phpMyAdmin, instead of selecting "check", choose for "repair" ;)
it's in the same menu :)
((U + C + I)x(10 − S)) / 20xAx1 / (1 − sin(F / 10))
President/CEO of Simple Machines - Server Manager
Please do not PM for support - anything else is usually OK.


Arantor

I doubt a REPAIR will fix those errors, actually. Need to look at the tables that are listed, with the indexes they have and we can provide a list of what there should be.

mortymoose

Thanks for the suggestions all......

Here's what I tried.....


"Have you tried going to Admin>Forum maintenance and "Repairing errors"?

CPanel>Databases>MySQLDtabases and repairing, there?"


I actually did this 2 days ago and have just repeated it to make sure, I got this message afterwards..

"Congratulations, no errors found! Thanks for checking."

Still keep getting emails stating, "There has been a problem with the database!

This is a notice email to let you know that SMF could not connect to the database, contact your host if this continues."

The forum appears to be running smoothly though, although I battled with a few mods that I tried to install that don't run ..... just those emails are becoming irritating...

******************************************

I also went and did "In phpMyAdmin, instead of selecting "check", choose for "repair"
it's in the same menu",

I got the following back,(Pardon my cut and pasting, it';s Friday!)

_________________________________________________

"SQL result

Host: localhost:3306
Database: oranjemund
Generation Time: Jan 21, 2011 at 05:11 PM
Generated by: phpMyAdmin 2.8.2.4 / MySQL 5.0.90-log
SQL query: REPAIR TABLE `smf_admin_info_files`, `smf_approval_queue`, `smf_attachments`, `smf_ban_groups`, `smf_ban_items`, `smf_boards`, `smf_board_permissions`, `smf_calendar`, `smf_calendar_holidays`, `smf_categories`, `smf_collapsed_categories`, `smf_custom_fields`, `smf_group_moderators`, `smf_log_actions`, `smf_log_activity`, `smf_log_banned`, `smf_log_boards`, `smf_log_comments`, `smf_log_digest`, `smf_log_errors`, `smf_log_floodcontrol`, `smf_log_gpbp`, `smf_log_group_requests`, `smf_log_karma`, `smf_log_mark_read`, `smf_log_member_notices`, `smf_log_notify`, `smf_log_online`, `smf_log_packages`, `smf_log_polls`, `smf_log_reported`, `smf_log_reported_comments`, `smf_log_scheduled_tasks`, `smf_log_search_messages`, `smf_log_search_results`, `smf_log_search_subjects`, `smf_log_search_topics`, `smf_log_spider_hits`, `smf_log_spider_stats`, `smf_log_subscribed`, `smf_log_topics`, `smf_mail_queue`, `smf_membergroups`, `smf_members`, `smf_messages`, `smf_message_icons`, `smf_moderators`, `smf_openid_assoc`, `smf_package_servers`, `smf_permissions`, `smf_permission_profiles`, `smf_personal_messages`, `smf_pm_recipients`, `smf_pm_rules`, `smf_polls`, `smf_poll_choices`, `smf_quiz`, `smf_quiz_answer`, `smf_quiz_category`, `smf_quiz_dispute`, `smf_quiz_infoboard`, `smf_quiz_league`, `smf_quiz_league_result`, `smf_quiz_league_table`, `smf_quiz_question`, `smf_quiz_question_type`, `smf_quiz_result`, `smf_quiz_session`, `smf_scheduled_tasks`, `smf_sessions`, `smf_settings`, `smf_smileys`, `smf_spiders`, `smf_subscriptions`, `smf_themes`, `smf_topics`;
Rows: 76
Table    Op    Msg_type    Msg_text
oranjemund.smf_admin_info_files    repair    status    OK
oranjemund.smf_approval_queue    repair    status    OK
oranjemund.smf_attachments    repair    status    OK
oranjemund.smf_ban_groups    repair    status    OK
oranjemund.smf_ban_items    repair    status    OK
oranjemund.smf_boards    repair    status    OK
oranjemund.smf_board_permissions    repair    status    OK
oranjemund.smf_calendar    repair    status    OK
oranjemund.smf_calendar_holidays    repair    status    OK
oranjemund.smf_categories    repair    status    OK
oranjemund.smf_collapsed_categories    repair    status    OK
oranjemund.smf_custom_fields    repair    status    OK
oranjemund.smf_group_moderators    repair    status    OK
oranjemund.smf_log_actions    repair    status    OK
oranjemund.smf_log_activity    repair    status    OK
oranjemund.smf_log_banned    repair    status    OK
oranjemund.smf_log_boards    repair    status    OK
oranjemund.smf_log_comments    repair    status    OK
oranjemund.smf_log_digest    repair    status    OK
oranjemund.smf_log_errors    repair    status    OK
oranjemund.smf_log_floodcontrol    repair    status    OK
oranjemund.smf_log_gpbp    repair    status    OK
oranjemund.smf_log_group_requests    repair    status    OK
oranjemund.smf_log_karma    repair    status    OK
oranjemund.smf_log_mark_read    repair    status    OK
oranjemund.smf_log_member_notices    repair    status    OK
oranjemund.smf_log_notify    repair    status    OK
oranjemund.smf_log_online    repair    status    OK
oranjemund.smf_log_packages    repair    status    OK
oranjemund.smf_log_polls    repair    status    OK
oranjemund.smf_log_reported    repair    status    OK
oranjemund.smf_log_reported_comments    repair    status    OK
oranjemund.smf_log_scheduled_tasks    repair    status    OK
oranjemund.smf_log_search_messages    repair    status    OK
oranjemund.smf_log_search_results    repair    status    OK
oranjemund.smf_log_search_subjects    repair    status    OK
oranjemund.smf_log_search_topics    repair    status    OK
oranjemund.smf_log_spider_hits    repair    status    OK
oranjemund.smf_log_spider_stats    repair    status    OK
oranjemund.smf_log_subscribed    repair    status    OK
oranjemund.smf_log_topics    repair    status    OK
oranjemund.smf_mail_queue    repair    status    OK
oranjemund.smf_membergroups    repair    status    OK
oranjemund.smf_members    repair    status    OK
oranjemund.smf_messages    repair    status    OK
oranjemund.smf_message_icons    repair    status    OK
oranjemund.smf_moderators    repair    status    OK
oranjemund.smf_openid_assoc    repair    status    OK
oranjemund.smf_package_servers    repair    status    OK
oranjemund.smf_permissions    repair    status    OK
oranjemund.smf_permission_profiles    repair    status    OK
oranjemund.smf_personal_messages    repair    status    OK
oranjemund.smf_pm_recipients    repair    status    OK
oranjemund.smf_pm_rules    repair    status    OK
oranjemund.smf_polls    repair    status    OK
oranjemund.smf_poll_choices    repair    status    OK
oranjemund.smf_quiz    repair    status    OK
oranjemund.smf_quiz_answer    repair    status    OK
oranjemund.smf_quiz_category    repair    status    OK
oranjemund.smf_quiz_dispute    repair    status    OK
oranjemund.smf_quiz_infoboard    repair    status    OK
oranjemund.smf_quiz_league    repair    status    OK
oranjemund.smf_quiz_league_result    repair    status    OK
oranjemund.smf_quiz_league_table    repair    status    OK
oranjemund.smf_quiz_question    repair    status    OK
oranjemund.smf_quiz_question_type    repair    status    OK
oranjemund.smf_quiz_result    repair    status    OK
oranjemund.smf_quiz_session    repair    status    OK
oranjemund.smf_scheduled_tasks    repair    status    OK
oranjemund.smf_sessions    repair    status    OK
oranjemund.smf_settings    repair    status    OK
oranjemund.smf_smileys    repair    status    OK
oranjemund.smf_spiders    repair    status    OK
oranjemund.smf_subscriptions    repair    status    OK
oranjemund.smf_themes    repair    status    OK
oranjemund.smf_topics    repair    status    OK"

-------------------------------------------------------------

I also did this now, but had done tried this 2 days back, still getting the emails....

For what it's worth, my forum, did crash about 2 months ago and I managed to get it up again,I think that was where the damaged might have occured, that was when i upgraded to RC4, Thereafter I only managed to get my shoutbox mod working , but could not get anymore mods to work, As I stated earlier, I am a newbie to all of this, but I suspect , perhaps one of the mods have corrupted the tables somewhere, I cannot uninstall those mods, I tried , but was warned by a big pink block that if I went ahead I would be sending my soul and forum to hell....

I therefore , plead with you more experienced folk, where can I turn to now, what shall I try next?

Thanks and enjoy your weekend....
8)

kat

Quote from: mortymoose on January 21, 2011, 10:26:46 AMStill keep getting emails stating, "There has been a problem with the database!

This is a notice email to let you know that SMF could not connect to the database, contact your host if this continues."

I'd do exactly what that message says and contact your host.

In normal circumstances, everything works. So, it's not the software, it's the provider. :)

mortymoose

Gee! The emails concerning Database connection problems seem to be increasing.... I have contacted my host, they don't see any problem on their side...I am going to post the email..

"Thanks Ian,

I have already received 16of these emails today already, I receive at least 2 an hour.As stated earlier the guys that developed the SMF software are saying that the error is with my host and not the software....

We have what we call packages that we install that interact with the database, I have been unable to install any of these packages since I have been receiving these errors....

I am going to post this email on the SMF website to see what the experienced guys can make of it...

thanks

Mike



----- Original Message -----
From: "Host4Africa Support" <[email protected]>
To: "MIke and His acer" <>
Sent: Monday, January 24, 2011 9:59 AM
Subject: Re: [H4A#2011012120002388774] Help with DBWebAdmin oranjemundonline.com


> Dear MIke,
>
> Thank you for contacting us.
>
> There is currently no problem now so it may have been high load and max
> connections reached on the server which caused the problem.
>
> Please let us know as soon as possible if/when you get any more of these notices,
> and let us know what time it occurs as well so that we can cross check with server
> load and notifications.
>
> Please advise?
>
> --
> Regards,
>        Ian
>        Host4africa.com Help Desk
>        [email protected]
>        http://www.host4africa.com/
>        Host4Africa - Get More For Less!
>
>
> "MIke and His acer" <> wrote:
>
>>
>>
>>
>>
>> > Ok, host4Africa people, the weekend is over, can somebody over there
>> > follow up on this problem....?
>> >
>> >
>> > Thanks
>> >
>> > MIke
>> > ----- Original Message -----
>> > From: "MIke and His acer" <>
>> > To: "Host4Africa Support" <[email protected]>
>> > Sent: Friday, January 21, 2011 6:09 PM
>> > Subject: Re: [H4A#2011012120002388774] Help with DBWebAdmin
>> >
>> >
>> >> Hi Matthew, thanks for the quick response, The email is generated by one
>> >> of the databases that I host on your server, the database is named
>> >> oranjemund. It is used to run the SMF Forum software that I run on my
>> >> site. Whenever a connection error is experienced by a user/member of my
>> >> forum, an automatic email is generated and sent to me, that states:
>> >>
>> >> "There has been a problem with the database!
>> >>
>> >> This is a notice email to let you know that SMF could not connect to the
>> >> database, contact your host if this continues"
>> >>
>> >> This is emailed to me from [email protected]
>> >>
>> >>
>> >> LINK TO  THE FORUM: http://www.oranjemundonline.com/Forum/index.php
>> >>
>> >> I will be doing work now, so more than likely will not be responding to
>> >> emails for a while...
>> >>
>> >> cheers
>> >>
>> >> MIke
>> >>
>> >>
>> >> ----- Original Message -----
>> >> From: "Host4Africa Support" <[email protected]>
>> >> To: "MIke and His acer" <>
>> >> Sent: Friday, January 21, 2011 5:59 PM
>> >> Subject: Re: [H4A#2011012120002388774] Help with DBWebAdmin
>> >>
>> >>
>> >>> Dear Mike,
>> >>>
>> >>> Thank you for contacting us.
>> >>>
>> >>> Please supply us with a link to where you encounter the database error
>> >>> or alternatively a screen shot of the complete error message which you
>> >>> encounter so that we may further advise?
>> >>>
>> >>> --
>> >>> Regards,
>> >>>        Matthew
>> >>>        Host4africa.com Help Desk
>> >>>        [email protected]
>> >>>        http://www.host4africa.com/
>> >>>        Host4Africa - Get More For Less!
>> >>>
>> >>>
>> >>> "MIke and His acer" <> wrote:
>> >>>
>> >>>> Hi Host4africa Person, currently called Matthew,
>> >>>>
>> >>>> I figured it out that it was the browser and pop ups , thanks....
>> >>>> listen
>> >>>> here, do I have to generate another ticket for a Database error
>> >>>> message? My
>> >>>> nickname on this forum is Mortymoose, if you can read what I have
>> >>>> posted
>> >>>> about database error messages and the final response reckons I should
>> >>>> contact my provider, which is you guys...
>> >>>>
>> >>>> LINK:
>> >>>> http://www.simplemachines.org/community/index.php?topic=418108.0;topicseen
>> >>>>
>> >>>> Cheers and enjoy the weekend...
>> >>>>
>> >>>> Mike


************************************************

Where do I turn to now?

I run two forums with 2 databases, same host, Different forum versions, and I cannot install any mods on both forums...... crazy........

Thanks on the blue Monday....
:)

kat

Look at it this way, Morty.

If everything's as it should be, with the forum software, it connects with the database, using the information that's stored in Settings.php.

If, now, it's not able to contact the database, it MUST be a problem with your host.

UNLESS you've changed the information in Settings.php.

Assuming you haven't done that, it's down to your host, 100%.


MrPhil

From the list of errors (mostly duplicate indexes) in the first post, I'd guess that someone ran install twice or something, and the database was modified incorrectly (indexes added twice). Try this: go into phpMyAdmin. Go through the list of errors (CHECK results?) one by one and see if you can delete index(es) on the table in question. You may have to remove all the indexes on a table, and then add one index back in. Use the install .sql file as a guide for what indexes should be used. Run CHECK again and see if you still have errors.

If you can make a backup first, that would be a margin of safety, although there's no guarantee that a good backup can be created in the first place if there are these errors.

mortymoose

MrPhil, thanks for your reply, I have a shrewd suspicion that you might be onto something, I had problems a few months ago, and had to restore from a database, at the same time upgrading  to RC4, applying mods , i battled and things did'nt go properly, I remember importing tables onto the db manually, but for the life of me cannot remember what I did, read it on the forum somewhere..... anyhow,

Following your instructions and have a look at this....

mortymoose

I have read your instructions over and over, but am nervous as hell and still unsure, what to do try and rectify it.....I am also unsure how to create a backup of the database before hand.... i went to the export tab, but the sql file that is saved is only 0b in size, so that can't be right......

thanks

Illori


Arantor

Yes, he's already tried that and it ended up giving out a bad backup.

Try turning off the compressed output there and seeing what happens.

mortymoose

Ok, Went via the SMF --> Admin----DATABASE---> Uncompressed backup, with table structure and table data and got to download a nice fat file weighing in at ,49.05 megs , which seems about right...

Ok, brave knights , we have a backup , now how to fix those table errors.... er, uhm, anyone, where you all gone to now....

;)

Arantor

Take a look at the file in a decent text editor, like Notepad++ and make sure the file doesn't end in an error message about running out of memory and that the last table it lists (with content) really is the last table in your database, usually smf_topics (they're in alphabetic order)

mortymoose

Gee.... 334 000 lines , anyhow, there is no error message on the last line and the last line says "done"

Starts with;"Database dump of tables in `oranjemund`"


Arantor

That's good :)

OK, now we're back to what MrPhil suggested. You go through the tables, and remove the indexes in phpMyAdmin where you have multiple indexes listed. If you look in the installer's install_mysql_2.0.sql file, you'll see that for each table it lists the 'KEY' or 'UNIQUE' for a given table - you can use that to see what there *should* be, and where what you have doesn't match, remove it (unless it's PRIMARY KEY, leave those alone for now)

MrPhil

You might also want to back up your database using phpMyAdmin or some other MySQL interface. I trust SMF's Admin DB backup about as much as I trust... hmm, I just spent several minutes trying to think of anyone I trust. Anyway, have an independent backup.

If you don't understand the concepts of such database operations as removing indexes and re-installing them, perhaps you shouldn't be doing it yourself. You'll have to grab someone locally who can lead you by the hand, or at least, let you watch and learn as they do it.

mortymoose

MrPhil, you are indeed right, I do not understand the concepts of such a database, I can get in there and look, then I sit, staring at all those options, what to delete, what to modify.....scares the heck outta me..... hence the reason, I am mulling on this.... I live in a remote town in the middle of the Namib desert, so there ain't local options, What I need , is one of those step by step instruction guides..... I ain't no expert...

Gonna get there....

MrPhil

You can do one of two things:
1) Hope and pray that you have a good database backup (all the data is complete). Check the table definitions against the install*.sql file and fix any that have extra indexes, etc. (The backup may or may not have written out multiple indexes). Anything that's different, you can check in with us here. Nuke your old database (drop all tables) and import the backup .sql. Hope that a good database results (that's the purpose of a backup, but they don't always work, especially if the backup was made from an already-corrupted database!).
2) Pay someone trustworthy and experienced to remotely access your system and fix it for you. If they mess it up and/or the database was too corrupted to salvage, see #1.

mortymoose

MrPhil, thanks for the info, I am a wee bit busy for the next few days at work, so I will sit down next week, and start to fiddle, I will return and post the outcome to see what happened,

It's helluva irritating receiving 65 emails every morning telling me that my database has a problem...

thanks and enjoy the weekend...


mortymoose

I just had a cunning plan my lord,

Do the backup, drop the tables, and then make a new forum ( I happen to have a spare forum, with nothing in or on it,) edit what should'nt be there, upload it to forum 2, see if it works , then point the old forum to forum 2 , delete the old forum, rename 2 back to one, and bob's your uncle..... will report back.....

to infinity and beyond!

Adish - (F.L.A.M.E.R)

Any updates over this?

While you backup with these issues, make sure that you go through every table and see that the tables are backed up properly with the rows and columns inside along with the table structure. Many a times, if a table has crashed, the backup is not clean. ;)

mortymoose

Sorry, for the delay, I wanted a good few hours, to sit and attempt this here repair job, unfortunately, work has caught up with me and I will need to find time...meanwhile I just endure the db error emails....... sigh!   I also cannot apply any mods, save for the shoutbox one....

I shall post a reply once I try it out.....

Advertisement: