i dont think u can just import a database from MP to tvh, your start point would be may here
https://tvheadend.org/d/5341-solved-importing-recordings
what i did was writing me a script which scraped my existing records and then added them auto via curl into tvh, sample cmd here
curl --data 'conf={"start":"1589400385","stop":"1589403256","channelname":"Sky 1 HD","title":{"ger":"Condor"},"files":[{"filename":"/Media/TVRIPS/Condor/Season 01/Condor - S01E02 - Die Lösung aller Probleme.mkv"}],"episode":{"enum":"2","snum":"1"},"subtitle":{"ger":"Die Lösung aller Probleme"} }' http://user@password@192.168.1.77:9981/api/dvr/entry/create
depending now what informations u have and want (title, episode, ...) and u need to scrape the infos from your recorded files
the raw command looks like this
curl --data 'conf={\"start\":\"$starttime\",\"stop\":\"$endtime\",\"channelname\":\"$channame\",\"title\":{\"ger\":\"$title\"},\"files\":[{\"filename\":\"$tvhfinalpath\"}],\"episode\":{\"enum\":\"$episode\",\"snum\":\"$season\"},\"subtitle\":{\"ger\":\"$subtitle\"} }' "http://$tvhuser:$tvhpass@$tvhip:$tvhport/api/dvr/entry/create""
as u see there are some values to fetch before which u have as sample in your existing xml's or in your filename's.
to update existing records in tvh when files are moved (i use this after i cutted coms and remux to mkv), sample
curl -s "http://"$tvhuser":"$tvhpass"@"$tvhip":"$tvhport"/api/dvr/entry/filemoved" --data-urlencode "src=$tvhsourcepath" --data-urlencode "dst=$tvhfinalpath"
here u see u only would need 2 variables, /old/path/file.ts /new/path/file.mkv, just in case ... cause tvh doesnt recognize when a file gets moved (or renamed).