Plesk: There is incorrect combination of resource records in the zone

Got this error when trying to add a mail CNAME in Plesk DNS:

Error: There is incorrect combination of resource records in the zone

Found RackerHacker’s note about it and it was as he said, trying to add a new CNAME for mail. So I added the ‘test’ hostname instead as a CNAME to the host I wanted to use, then set about updating that in the psa DB.

One commenter suggested using phpmyadmin to make the changes to the dns_recs table in the psa database, but I didn’t have phpmyadmin setup for server wide usage.

So I just logged into mysql from the command line and did this:

mysql> select * from dns_recs;

to get the list of DNS records. Then I found the ID of the record I needed to change and did these 2 commands:

update dns_recs set host='mail.example.org' where id='XX'
update dns_recs set displayHost='mail.example.org' where id='XX'

Change mail.example.org to your domain and ID to the record ID you found and that’s how to set a mail CNAME for a non-local host. Should be a simple task, yes…