how to convert a MySQL dump file to human-readable text?

Volker Wysk post at volker-wysk.de
Thu Aug 29 07:27:20 UTC 2024


Am Donnerstag, dem 29.08.2024 um 06:10 +0000 schrieb Marco Fioretti:
> Greetings,
> 
> I have a  plain text backup file of a MySql database, generated years ago
> with mysqldump or similar commands (not by me, so I have no more details).
> It is the backup of a Drupal website, with lots of posts and even more
> metadata.
> 
> I need to convert it to something more readable, because I must find, copy
> and reuse the text of some posts, and doing that directly on the backup
> file would be really cumbersome, because I don't even know in advance
> which and how many posts I should copy.
> 
> For several reasons, I have nowhere to install a MySql *server* right now,
> so I need to process the backup file directly.
> 
> The only source I have found that really deals with this problem is this
> paywalled post:
> 
> https://blog.twineworks.com/converting-a-mysql-dump-to-csv-files-b5e92d7cc5dd
> 
> so I'd like to ask if somebody else has already tackled this problem, how,
> and any suggestions you may have on how to proceed.

If you know some programming language, you could write a program that parses
the mysql dump file and outputs it in a more readable format.

I would know how to do this.

It depends on the dump (and the programming language), how hard this would
be.

But best would of course be, to set up a MySQL server and restore the
dump...

Cheers,
Volker



More information about the ubuntu-users mailing list