1-time MySQL leads table update/repair from CSV

The opportunity is:

I made a bad API call and it totally wrecked my leads table, with corrupted data that got split up over multiple columns - very messy. I recovered the data, fortunately, in a CSV file with ~3k contacts incl anon. I also have a backup of the live DB in its current state (with corrupted leads data), so we can run through this process as many times as we need.

I managed to get the leads table rebuilt from the CSV, but it’s not clean and not 100% correct. Front end in Mautic still showing (some, not all) data in the wrong columns, for example anon contacts aren’t recognized as anon by Mautic and their IPs appear under the “Name” column on Contacts page - but at least single data items aren’t split across multiple columns, so it still feels like progress.

Further, contact ids in Mautic are in the wrong column so viewing/editing contacts and their info is not possible, however they do show up correctly in the MySQL table correctly, which makes me think this there could be a PHP issue, or at least that I did something wrong in the process.

I am an absolute beginner in MySQL and DB mgmt so it’s most likely a mistake on my part. I’m hoping this could be a 15-minute issue for a Mautic/MySql expert and also hoping the entirety of the issue lies in MySql.

Support issue topic:

It is based in:

Online, VPS, communication by Whatsapp/email.

Remote OK?: 100%


I will compensate fairly based on pre-negotiated terms after we calculate the scale of this job.

To find our more:

Please respond here in this thread.

Thank you,



Interested in your requirement.

Please reach me at Skype or Email.

Skype - cis.seth

Email - seth@cisinlabs.com


Seth R

1 Like

What you are wanting done is well within my area of expertise and I would be glad to help you out.
You can reach me on andrewjohnson56782@gmail.com
Cheers and Have a great day ahead,

1 Like

Thank you guys, have emailed you both.