LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 03-14-2009, 11:40 AM   #1
Ujjain
Member
 
Registered: Mar 2009
Posts: 33

Rep: Reputation: 15
Lost connection to MySQL server during query when executing 'REPAIR TABLE ... '?


One of the 80 databases running on one of our MySQL Database Servers seems to be showing problems. It seems to be corrupt of some kind, although the website using it, runs perfectly fine. But due a lot of MySQL outages recently, I wish to have this database repaired.
Code:
mysqlcheck --repair db_name -uadmin -ppassword mysqlcheck: Got error: 2013: Lost connection to MySQL server during query when executing 'REPAIR TABLE ... '
 
Old 03-19-2009, 04:33 PM   #2
Ujjain
Member
 
Registered: Mar 2009
Posts: 33

Original Poster
Rep: Reputation: 15
If you require extra information or know of a better place where to ask this, please let me know.
 
Old 03-19-2009, 04:54 PM   #3
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,751

Rep: Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610Reputation: 2610
Quote:
Originally Posted by Ujjain View Post
If you require extra information or know of a better place where to ask this, please let me know.
Your posts are a bit confusing, and yes more information is needed. You don't say anything about your environment, what version/distro of Linux you're running, or what version of MySQL.

You say "seems to be showing problems", and "corrupt of some kind". Care to elaborate? If the applications that need to access the database are working, that should tell you if the database is corrupt or not.

Does your database use ISAM tables? Have you backed up this database, using mysqldump, in case you have problems? That would be a good idea, no matter what. You can then restore the backup to another system, run your checks/repairs/etc/, and not touch a production system.

Also, have you checked the user ID/password/syntax on the command? Check the man page for mysqlcheck.
 
Old 03-20-2009, 09:05 AM   #4
Ujjain
Member
 
Registered: Mar 2009
Posts: 33

Original Poster
Rep: Reputation: 15
Thanks for your reply.

I have checked the parameters. They are valid including the username, password and databasename, as the errors shows up for mysqlcheck, mysqldump and phpMyAdmin for that specific database.

The database still works for the website, but things aren't looking too good. I wish to do an export and re-import as soon as possible. Unfortunately a MySQL dump doesn't even work.

Code:
[root@server ~]# mysqldump -uadmin -p  reek > reek.sql
mysqldump: Couldn't execute 'show table status like 'account': Lost connection to MySQL server during query (2013)
I have no idea how corrupt they are, all I know is the SQL databases cause problems and I often see "Lost connection to MySQL server during query".
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error: Lost connection to MySQL server during query the expert Linux - Newbie 6 09-04-2008 12:40 PM
Lost connection to MySQL server during query figure8car Mandriva 1 12-05-2004 04:28 PM
ERROR 2013: Lost connection to MySQL server during query kicap Linux - Software 0 11-23-2004 08:30 PM
Error: lost connection to MySQL server during query patpawlowski Programming 2 01-23-2004 07:56 AM
Mysql Error: Lost Connection to Mysql during query ramnath Programming 5 11-18-2003 12:27 PM


All times are GMT -5. The time now is 06:56 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration