Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 565613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:53:26+00:00 2026-05-13T12:53:26+00:00

I’m having problems re-importing a database dump made by mysqldump. I ran mysqldump with

  • 0

I’m having problems re-importing a database dump made by mysqldump. I ran mysqldump with the order-by-primary option, and I had it run on a table with a unique key (and no explicit primary key, so it sorted by that unique key). My objective in this case was to re-create the table, making the unique key into the primary key.

This dump took a very long time (around 10 days) and it would be a major pain in the ass to run it again. I tried reimporting the dump (with the appropriate schema changes), but mysql choked midway through. I looked in the dumpfile, at the place where it choked – and it looks like someone inserted a spam email right into the text of the dumpfile.

Fortunately, it looks like the damage was isolated, I’m able to see the key right before the garbage, and right after.

tl;dr: if I just spliced out the garbage, I dont know how many keys will be missing between the one before and the one after – the dump is sorted by that unique key, so it makes life easier in that respect. Does mysql have a way to retrieve all rows between two entries in an index?

The key is a 32-character hex string, stored in a CHAR(32) type column. I’m pretty sure I can’t use the < or > operators on strings… so any suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T12:53:26+00:00Added an answer on May 13, 2026 at 12:53 pm

    Sorting the mysqldump on the primary key (or unique key) is what made it take so long. Ten days is pretty unbelievable, though.

    Doing a sort like this is useful only when you want to backup a MyISAM table and restore it to an InnoDB table. Is this what you’re doing?

    MySQL certainly does have a way to dump subsets of a table. Check out the --where option of mysqldump. This should allow you to back up the rows that got corrupted.

    And yes, you can use < and > on strings in SQL. You can also use the BETWEEN predicate.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I have a reasonable size flat file database of text documents mostly saved in
I have a view passing on information from a database: def serve_article(request, id): served_article
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.