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

Peter Flynn peter at silmaril.ie
Thu Aug 29 08:01:40 UTC 2024


I thought mysql had a -X option that dumped in XML syntax. It certainly 
used to because I used it frequently.

P

On 29 August 2024 08:27:53 Volker Wysk <post at volker-wysk.de> wrote:

> 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
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at: 
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20240829/f8c8f5cd/attachment.html>


More information about the ubuntu-users mailing list