Results 1 to 7 of 7
  1. #1
    Join Date
    May 2014
    Posts
    5

    Question Unanswered: Help on database

    I have a rather complex database (inner joins, outerjoins etc). One of the tables has corruption in in. When I try to do a dump, the database always drops out on a line on one table.

    I can do a dump by dumping the entire database, and then dumping the table (all entries before the line and all entries after the line).

    I've done so me work with databases (creating them, backing them up etc) but this is issue is a first for me.

    The tool mysqlcheck does not find an issue with the database table and I've run repairs on all the tables.

    Any idea where I should proceed from here?

    Thanks for any help as I'm floundering here.

    Phillip

  2. #2
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    495
    Provided Answers: 24
    Sometimes it helps to rebuild.
    1. Build a new table from scratch. Append the data from the old one.
    done.

    or 2. create new db. import everything EXCEPT the bad table. Do step 1.
    (I've had this work once or twice)

  3. #3
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    If mysqlcheck doesn't find a problem, then I'm going to guess that there may be a character column that contains an "offensive" character like a newline, tab, or a vertical tab that your MySQL client is having trouble interpreting. Your table may not be corrupt at all.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  4. #4
    Join Date
    May 2014
    Posts
    5

    Will This Work

    I can sqldump biblioitems table right up to the line before the bad one - 35431 and then sqldump the rest of the table right after the bad line to the end of the table.

    This means I get a dump with rows 1 - 35430 and another dump with rows 35432 - end of table.

    How would I rebuild the table and copy the rows back in (which would in effect skip the bad table)? Would this work or would it through the database off?

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Sounds to me that Pat is right.. you have a character that is causing corruption.
    id try to find what the row that causes the problem contains and fix it
    I'd rather be riding on the Tiger 800 or the Norton

  6. #6
    Join Date
    May 2014
    Posts
    5

    Nothing like confusion

    I had some time tonight and tried to work on this problem again. I used mysql to create a new table like the old one, and changed the engine to the same as on the old table. I tried to insert tables from the old table to the new one - it failed at record 35429.

    I went through the process again but when I inserted the records from the old table I used the limit command and inserted the first 35428 records. I then tried to insert the new 16572 records starting at record 35429. The connection failed.

    I kept repeating this process upping the record that I started with but I kept getting a dropped connection.

    I can do a mysqldump using the limit command for the first 35428 records and then dump the last 35572 starting at record 35430 but it seems I can't skip what I think is the bad record and import the rest.

    What's up with that. If anyone has any ideas, please let me know as I'm confused in Montana.

    Thanks.

  7. #7
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    examine the row(s) that is/are failing look for anythign that is suspicous/odd out of usual
    if found fix using an update query
    then try again
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •